.. This file is part of the OpenDSA eTextbook project. See
.. http://opendsa.org for more details.
.. Copyright (c) 2012-2020 by the OpenDSA Project Contributors, and
.. distributed under an MIT open source license.

.. avmetadata::
   :title: DFA Complement Exercises
   :author: Mostafa Mohammed; Cliff Shaffer
   :requires: Deterministic Finite Automata
   :satisfies:
   :topic: DFA Complement exercise
   :keyword: Finite Automata; Deterministic Finite Acceptor
   :naturallanguage: en
   :programminglanguage: N/A
   :description: Exercises where user constructs the DFA for the complement of a language.

DFA Complement Exercise
=======================

.. .. DO NOT USE: These are obsolete. Each of the DFA exercise sets
   has a complement exercise included that complements one of the
   machines already in the exercise.
   
DFA Complement Exercise 1
-------------------------

HINT: If DFA :math:`M` accepts language :math:`L`, the we can create a
machine to accept the complement of :math:`L` by reversing the final
and non-final states of :math:`M`.
However, that only works on a complete DFA, meaning that we have to
take into account the trap state.

.. avembed:: AV/OpenFLAP/exercises/FLAssignments/FA/DFANotaabb.html pe
   :long_name: Construct DFA that accepts a language



DFA Complement Exercise 2
-------------------------

HINT: If DFA :math:`M` accepts language :math:`L`, the we can create a
machine to accept the complement of :math:`L` by reversing the final
and non-final states of :math:`M`.
However, that only works on a complete DFA, meaning that we have to
take into account the trap state.

.. avembed:: AV/OpenFLAP/exercises/FLAssignments/FA/DFANotevena3b.html pe
   :long_name: Construct DFA of language complement


