1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Shalnov [3]
3 years ago
7

The product construction yields a DFA that accepts the union of two regular languages. Sometimes the construction gives a minima

l DFA, but it often gives a DFA with more states than necessary. Show that even if we start with two minimal DFAs, the resulting DFA may not be minimal.
Computers and Technology
1 answer:
12345 [234]3 years ago
6 0

Answer:

Explanation:

Suppose language B over alphabet Σ has a DFA

M = ( Q, Σ, δ, q1, F ).

Then, a DFA for the complementary language B is

M = ( Q, Σ, δ, q1, Q − F ).

The reason why M recognizes B is as follows. First note that M and M have the

same transition function δ. Thus, since M is deterministic, M is also deterministic.

Now consider any string w ∈ Σ∗

. Running M on input string w will result in M

ending in some state r ∈ Q. Since M is deterministic, there is only one possible state that M can end in on input w. If we run M on the same input w, then M will end in

the same state r since M and M have the same transition function. Also, since M is

deterministic, there is only one possible ending state that M can be in on input w.

Now suppose that w ∈ B. Then M will accept w, which means that the ending state

r ∈ F, i.e., r is an accept state of M. But then r 6∈ Q − F, so M does not accept w

since M has Q − F as its set of accept states. Similarly, suppose that w 6∈ B. Then

M will not accept w, which means that the ending state r 6∈ F. But then r ∈ Q − F,

so M accepts w. Therefore, M accepts string w if and only M does not accept string

w, so M recognizes language B. Hence, the class of regular languages is closed under

complement.

4. We say that a DFA M for a language A is minimal if there does not exist another

DFA M′

for A such that M′ has strictly fewer states than M. Suppose that M =

(Q, Σ, δ, q0, F) is a minimal DFA for A. Using M, we construct a DFA M for the

complement A as M = (Q, Σ, δ, q0, Q − F). Prove that M is a minimal DFA for A.

Answer:

We prove this by contradiction. Suppose that M is not a minimal DFA for A. Then

there exists another DFA D for A such that D has strictly fewer states than M.

Now create another DFA D′ by swapping the accepting and non-accepting states of

D. Then D′

recognizes the complement of A. But the complement of A is just A,

so D′

recognizes A. Note that D′ has the same number of states as D, and M has

the same number of states as M. Thus, since we assumed that D has strictly fewer

states than M, then D′ has strictly fewer states than M. But since D′

recognizes A,

this contradicts our assumption that M is a minimal DFA for A. Therefore, M is a

minimal DFA for A.

5. Suppose A1 and A2 are defined over the same alphabet Σ. Suppose DFA M1 recognizes

A1, where M1 = (Q1, Σ, δ1, q1, F1). Suppose DFA M2 recognizes A2, where M2 =

(Q2, Σ, δ2, q2, F2). Define DFA M3 = (Q3, Σ, δ3, q3, F3) for A1 ∩ A2 as follows:

Set of states of M3 is

Q3 = Q1 × Q2 = { (x, y) | x ∈ Q1, y ∈ Q2 }.

The alphabet of M3 is Σ.

M3 has transition function δ3 : Q3 × Σ → Q3 such that for x ∈ Q1, y ∈ Q2,

and ℓ ∈ Σ,

δ3( (x, y), ℓ ) = ( δ1(x, ℓ), δ2(y, ℓ) ) .

The initial state of M3 is s3 = (q1, q2) ∈ Q3.

The set of accept states of M3 is

F3 = { (x, y) ∈ Q1 × Q2 | x ∈ F1 and y ∈ F2 } = F1 × F2.

Since Q3 = Q1 × Q2, the number of states in the new DFA M3 is |Q3| = |Q1| · |Q2|.

Thus, |Q3| < ∞ since |Q1| < ∞ and |Q2| < ∞.

You might be interested in
You are going to write a program for Computer test which will read 10 questions from a file, order them randomly and provide the
ollegr [7]

Answer:

from pprint import pprint

import random

match = {

   "mcq1": "a",

   "mcq2": "c",

   "mcq3": "c",

   "mcq4": "d",

   "mcq5": "a",

   "mcq6": "a",

   "mcq7": "a",

   "mcq8": "b",

   "mcq9": "d",

   "mcq10": "a"

}

file = open("test","r")

questions = set()

for i in range(10):

   ques = []

   for line in file:

       if "-" in line:

           break

       else:

           ques.append(line)

   questions.add(tuple(ques))

def quiz(questions, match):

   questions = list(questions)

   marks = 0

   for i in range(10):

       pprint(questions[i])

       mcq = "mcq",str(i+1)

       mcq = list(mcq)

       answer = input("enter your answer: ")

       if answer == match["".join(mcq)]:

           marks += 1

   return marks

print("Your score is: ",quiz(questions, match))

Explanation:

the file which has been loaded is test, and its data is provided below...

mcq1. The device which converts analog signals to digtital signals and vice versa is called.

a) mother board

b) TAP

c) Modem

d) I/O device

-

mcq2. The main components of a computer system are.

a) TAP, CPU, Printer

b) CPU, Input device

c) CPU, ALU, CU

d) CPU , Output device , Memory unit, Control unit

-

mcq3. A source program is a program.

a) writter in machine laguage

b) translated in machine langaue

c) written in high level language

d) required to boot a computer

-

mcq4.Which image format supports transparency in images.

a) PNG

b) GIF

c) JPG

d) A & B

-

mcq5. (10111) 2 = (?) 10.

a) 23

b) 50

c) 24

d) 89

-

mcq6. UNICODE is an example of.

a) character encoding set

b) driver

c) software

d) database

-

mcq7. (10111) 2 = (?) 10.

a) 23

b) 50

c) 24

d) 89

-

mcq8. NTFS stand for.

a) Network File Saving

b) New Technology File System

c) Newt Trend File Saving

d) Non Technology File System

-

mcq9. FF is example of.

a) Octal number system

b) Binary Number System

c) Decimal Number System

d) Hexadecimal number system

-

mcq10. Emails are sent with the help of ?

a) SMTP

b) FTP

c) HTTP

d) UDP

-

3 0
4 years ago
How many free passes do you get for skipping videos and getting answers
blondinia [14]

Answer:

I think it is 1 because that is all that works for me

3 0
2 years ago
Is the process of modifying something to make it fit certain criteria.
alexandr402 [8]

Answer:

Design Process

8 0
3 years ago
What is the difference between an ISP and a web host?
emmainna [20.7K]

Answer:

An ISP is an internet service provider. AT&T and Comcast are both popular internet service providers. On the other hand, web hosts are used to host websites like att.com. The web host makes the website accessible by other people.

Explanation:

5 0
3 years ago
Which is currently the most common cellular network?<br> 4G<br> 4G LTE<br> 5G<br> 5G LTE
Misha Larkins [42]

Answer:

4GLte

Explanation:

8 0
3 years ago
Other questions:
  • Stefan is finalizing his presentation by adding media files and preparing it for distribution. Stefan knows that saving a presen
    13·1 answer
  • A __engineer specializes in computer hardware design and integration.
    15·1 answer
  • Which method allows a computer to react accordingly when it requests data from a server and the server takes too long to respond
    5·1 answer
  • The _____ search algorithm searches a list for a given item, starting with the first element and continues to compare the item w
    12·1 answer
  • Write a C function which mimics the behavior of the assembly language function below. Note that this time, the assembly language
    10·1 answer
  • Write a C++ program to find if a given array of integers is sorted in a descending order. The program should print "SORTED" if t
    14·1 answer
  • 2 Manter o autocontrole nos ajuda a evitar muitos problemas na nossa vida pessoal e no ambiente profissional. Em se tratando de
    14·1 answer
  • One of your suppliers has recently been in the news. Workers complain of long hours, hot and stuffy workrooms, poor lighting, an
    15·1 answer
  • Anyone who do bug bounty hunt ?​
    10·1 answer
  • The capability of moving a completed programming solution easily from one type of computer to another is known as ________. Grou
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!