CMPT 125 Study Guide - Final Guide: Regular Expression

89 views2 pages

Document Summary

Draw a dfa that accepts all strings that contain aab , and rejects all other strings. Draw a dfa that rejects all strings that contain aab , and accepts all other strings. Describe the language expressed by the following regular expressions. Let f(n) and g(n) be two functions on positive integers. f = o(g) will mean that f is essentially smaller than g. Wrong definition: f = o(g) if f(n) <= g(n) for all n. Wrong definition 2: f = o(g) if f(n) <= 2g(n) for all n. Then, we want f = o(g), but it is not true that f(n) <= g(n) for all n. Correct definition: we say that f = o(g) if there exists a large enough constant c (e. g. c = 1000) such that f(n) <= c*g(n) for all n. Write a function to determine whether an expression is legal.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers

Related Documents

Related Questions