The document discusses converting regular expressions to minimized deterministic finite automata (DFAs) in several steps:
1. Use Thompson's algorithm to convert the regular expression to a non-deterministic finite automaton (NFA).
2. Use the subset construction algorithm to convert the NFA to a DFA.
3. Use the tabulation method (also called Mark/Reduce procedure) to minimize the obtained DFA.
Several examples are provided to demonstrate applying these steps to convert regular expressions like (a+b)*abb and abb(a+b)* to their minimized DFA representations. The subset construction algorithm and tabulation method for minimization are explained.
Given two integer arrays val[0...n-1] and wt[0...n-1] that represents values and weights associated with n items respectively. Find out the maximum value subset of val[] such that sum of the weights of this subset is smaller than or equal to knapsack capacity W. Here the BRANCH AND BOUND ALGORITHM is discussed .
A presentation on prim's and kruskal's algorithmGaurav Kolekar
This slides are for a presentation on Prim's and Kruskal's algorithm. Where I have tried to explain how both the algorithms work, their similarities and their differences.
Given two integer arrays val[0...n-1] and wt[0...n-1] that represents values and weights associated with n items respectively. Find out the maximum value subset of val[] such that sum of the weights of this subset is smaller than or equal to knapsack capacity W. Here the BRANCH AND BOUND ALGORITHM is discussed .
A presentation on prim's and kruskal's algorithmGaurav Kolekar
This slides are for a presentation on Prim's and Kruskal's algorithm. Where I have tried to explain how both the algorithms work, their similarities and their differences.
Knapsack problem ==>>
Given some items, pack the knapsack to get
the maximum total value. Each item has some
weight and some value. Total weight that we can
carry is no more than some fixed number W.
So we must consider weights of items as well as
their values.
An ordered collection of items from which items may be deleted from one end called the front and into which items may be inserted from other end called rear is known as Queue.
It is a linear data structure.
It is called the First In First Out (FIFO) list. Since in queue, the first element will be the first element out.
Knapsack problem ==>>
Given some items, pack the knapsack to get
the maximum total value. Each item has some
weight and some value. Total weight that we can
carry is no more than some fixed number W.
So we must consider weights of items as well as
their values.
An ordered collection of items from which items may be deleted from one end called the front and into which items may be inserted from other end called rear is known as Queue.
It is a linear data structure.
It is called the First In First Out (FIFO) list. Since in queue, the first element will be the first element out.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
Delivering Micro-Credentials in Technical and Vocational Education and TrainingAG2 Design
Explore how micro-credentials are transforming Technical and Vocational Education and Training (TVET) with this comprehensive slide deck. Discover what micro-credentials are, their importance in TVET, the advantages they offer, and the insights from industry experts. Additionally, learn about the top software applications available for creating and managing micro-credentials. This presentation also includes valuable resources and a discussion on the future of these specialised certifications.
For more detailed information on delivering micro-credentials in TVET, visit this https://tvettrainer.com/delivering-micro-credentials-in-tvet/
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...NelTorrente
In this research, it concludes that while the readiness of teachers in Caloocan City to implement the MATATAG Curriculum is generally positive, targeted efforts in professional development, resource distribution, support networks, and comprehensive preparation can address the existing gaps and ensure successful curriculum implementation.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
2. RE to DFA
• To convert RE to NFA use – Thompson’s algorithm
• To convert NFA to DFA use – Subset Construction algorithm
• To minimize the obtained DFA use – Tabulation method (also called
Mark/Reduce procedure)
3. Subset construction algorithm
Step 1: Find the λ-closure of all the states
Step 2: Let the λ-closure of the initial state be named as A
Step 3: Now find the transitions of each input symbol on this state A.
Then, find the λ-closure of the above set and name it as A if it appears
to be same otherwise give a new name as B.
Step 4: Repeat Step 3 for each of the new states added until there are
no new states in the queue.
Step 5: Convert the above representation to a DFA. The initial state of
the DFA will be A. Mark the final states of DFA.
17. Example 3
• λ-closure(q0) = {q0} – A
• λ-closure(ẟ(A, 0)) = λ-closure(q0,q1} = {q0,q1} – B
• λ-closure(ẟ(A, 1)) = λ-closure(q1} = {q1} – C
• λ-closure(ẟ(B, 0)) = λ-closure(q0,q1,q2} = {q0,q1,q2} – D
• λ-closure(ẟ(B, 1)) = λ-closure(q1,q2} = {q1,q2} – E
• λ-closure(ẟ(C, 0)) = λ-closure(q2} = {q2} – F
• λ-closure(ẟ(C, 1)) = λ-closure(q2} = {q2} – F
• λ-closure(ẟ(D, 0)) = λ-closure(q0,q1,q2} = {q0,q1,q2} – D
• λ-closure(ẟ(D, 1)) = λ-closure(q1,q2} = {q1,q2} - E
18. Example 3
• λ-closure(ẟ(E, 0)) = λ-closure(q2} = {q2} – F
• λ-closure(ẟ(E, 1)) = λ-closure(q2} = {q2} – F
• λ-closure(ẟ(F, 0)) = φ
• λ-closure(ẟ(F, 1)) = λ-closure(q2} = {q2} - F
States 0 1
-> A B C
*B D E
*C F F
*D D E
*E F F
F φ F
19. Example 3
B
C
D
E
F
A B C D E
States 0 1
-> A B C
*B D E
*C F F
*D D E
*E F F
F φ F
Pairs:
(BD), (CE)
20. Example 3 – Minimized DFA
• Let (BD) be X
• Let (CE) be Y
States 0 1
-> A B C
*B D E
*C F F
*D D E
*E F F
F φ F
States 0 1
-> A X Y
*X X Y
*Y F F
F φ F
A
X
Y
F
X
Y
1
0
1
0
0, 1
0, 1
0
21. Example 4
• Find the minimized DFA for the given NFA
• λ-closure(q0) = {q0, q1}
• λ-closure(q1) = {q1}
• λ-closure(q2) = {q2}
q0 q1 q2
q1
0
0, λ
1
0, 1
1
23. Example 4
B
C
A B
States 0 1
->* A B C
*B B C
*C B C
All pairs are
indistinguishable
So, {ABC} is a single
state
X
X
0, 1
24. Example 5 - Minimize the given DFA
• First draw the DFA and check if all
the states are reachable from start
state
• The sets are {q1, q2, q3} and {q2,
q3}.
• So, {q1, q2, q3} can be combined
into one state
States 0 1
-> q0 q1 q3
q1 q2 q4
q2 q1 q4
q3 q2 q4
*q4 q4 q4
q1
q2
q3
q4
q0 q1 q2 q3
States 0 1
-> q0 X X
X X q4
*q4 q4 q4
25. Exercises – NFA to Minimized DFA
1.
2.
A B X
C
a
b c
λ λ
A B C
B
0 1
0,1 0,1
26. Exercises – NFA to Minimized DFA
3.
4. RE ab*a(a+b)
5. RE (0+1)+(0+1)*
6. 𝐿 = 𝑎𝑛𝑏𝑚 ∶ n ≥ 1, m ≥ 2
7. 𝐿 = 𝑎𝑛b: n ≥ 1} ⋃ {𝑏𝑛a ∶ n ≥ 1
A B X
C
a
b a, b
a, λ b, λ
b, λ
27. Exercises – Minimize the DFA
8. 9.
States 0 1
-> A B F
B G C
*C A C
D C G
E H F
F C G
G G E
H G C