Download presentation
Presentation is loading. Please wait.
1
CS252: Systems Programming
Ninghui Li Topic 22: Regular Expressions and Finite State Automata
2
See Slides from External Sources
3
Clicker Question 1 (SQL)
Given 4 tables: Product (pname, price, category, manufacturer) Purchase (buyer, seller, store, product) Company (cname, stock price, country) Person(per-name, phone number, city) To find the names of people who bought American products, how many tables need to joined together in a SELECT statement? 1 2 3 4 The query cannot be answered using these tables.
4
Clicker Question 2 (DFA)
What regular language is accepted by the following DFA? abca a(bc)+a abc(bbc)*a abc(bbc)+a None of the above b a b c a q0 q1 q2 q3 q4
5
Clicker Question 3 (DFA)
What regular language is accepted by the following DFA? abc(c*) (ac|b)c* a(b|c)+ b|ac(c*) None of the above q1 b e c q0 q2 q3 a e
6
Clicker Question 4 (For fun)
You are given a biased coin, which will given head with a certain probability p, where the exact value of p is unknown. If you want to use this coin to make an unbiased binary decision, i.e., decide Yes with probability ½, what is the minimal number of times you need to throw your coin to do so? A. 1 B. 2 C. 3 D. 4 or higher E. It cannot be done
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.