1 / 22

CT 100 Weeks 14 and 15

CT 100 Weeks 14 and 15. Quiz 14 Vocabulary. All vocabulary from week 13 and the following terms Polynomial time algorithm Exponential time algorithm Undecidable (or non-computable) problem. Quiz 14 Vocabulary. Polynomial time algorithm

Download Presentation

CT 100 Weeks 14 and 15

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CT 100 Weeks 14 and 15

  2. Quiz 14 Vocabulary • All vocabulary from week 13 and the following terms • Polynomial time algorithm • Exponential time algorithm • Undecidable (or non-computable) problem

  3. Quiz 14 Vocabulary • Polynomial time algorithm • An algorithm with an execution time that is a polynomial function of the input size • Exponential time algorithm • An algorithm with an execution time that is an exponential function of the input size • Undecidable (or non-computable) problem • A problem for which no algorithm can exist

  4. Quiz 14 Problems • Evaluate Excel Formulas • Evaluate String Operations • Evaluate Regular Expressions • Write Regular Expressions

  5. Final Exam • The final exam has 2 parts • The final exam is cumulative • Studying for the final exam • Study final exam vocabulary • Study all old quizzes • Study lecture notes • Study assignments

  6. Final Exam Part 1 • Wednesday December 11 in Class • 20 points • Vocabulary • A few short answer and multiple choice questions • No Notes

  7. Final Exam Part 1 Vocabulary • Bit • Byte • Algorithm • Syllogism • Data Compression • Premise • Law of non-contradiction • Law of the excluded Middle • Character code • Logic gate • Primary key • Foreign key • Cartesian product of tables • Referential integrity • Event • Loop • Selection (if statement) • Query

  8. Final Exam Part 1 Vocabulary • Operating System • Processor • Stored program architecture • Arity of an operator • Operand • Operator • Precedence of an operator • Associativity of an operator • Indexing of strings • Concatenation of strings • Regular expression • Polynomial algorithm • Exponential algorithm • Undecidable • Tautology • Premise • SQL • Join of tables

  9. Final Exam Part 2 • 2:30-4:30 Friday December 13 • 80 points • In Room 2314 Centennial • You can bring 1 8.5X11 inch piece of paper with notes. The notes must be hand written and you can use both sides. You do not have to write the ASCII table. I will give you that.

  10. Assignment 3 • Due 11:00 AM Wednesday December 4 • See handout

  11. Which strings on the right match the regular expressions on the left • . • .* • \d • \d* • \D* • \w* • [0-9][0-9](\D)* • .*(abc).* • “x” • “%23a” • “9” • “” • “4192” • “abc” • “84#abcdef” • “46” • “81xyz”

  12. Which strings on the right match the regular expressions on the left • (\D)*\d\d\d • [A-Za-z]*(\s)+[0-9][0-9] • …[0-9]{3}.? • “ 32” • “Abz817” • “&1A569” • “a 02” • “776” • “1234567” • “abc1234”

  13. Write Regular Expressions to match the patterns described below • 1 or more digits • 1 or more digits followed by a colon followed 0 or more digits • 1 to 8 upper or lower case letters • 2 characters followed by 2 digits followed by 0 or more upper case letters • An optional character followed by 3 upper or lower case letters followed by 1 or more whitespace characters followed by 0 or more digits

  14. Which strings on the right match the regular expressions on the left • ..[0-9]?.. • (0|1)+ • [A-Za-z]([0-9]|[A-Za-z])* • [0-9]{5}(-[0-9]{4})? • “ABCD” • “001101” • ##7$% • 54601-1234 • 54603 • wa32c1

  15. Write a phrase that describes the regular expressions shown below • ..[0-9]?.. • Two characters followed by an optional digit followed by 2 characters • (0|1)+ • A string of one or more 0s and 1s • [A-Za-z]([0-9]|[A-Za-z])* • A letter followed by 0 or more letters and digits • [0-9]{5}(-[0-9]{4})? • 5 digits followed by an optional dash and 4 digits

  16. Write a phrase that describes the regular expressions shown below • (\D)*\d\d\d • [A-Za-z]*(\s)+[0-9][0-9] • …[0-9]{3}.?

  17. Write Regular Expressions to match the patterns described below • Three digits followed by a comma followed by three digits • An optional 3 digits and a comma followed by 3 digits followed by a comma followed by 4 digits • Two upper case letters followed by 3 digits • An optional exclamation point or dollar sign followed by 1 or more digits followed by an optional exclamation point or dollar sign

  18. Circle the substrings that match the regular expression-?\d[A-Z]\D • ABC -1WX1B# -1Q Z • -1W2C%-3&-4NN

  19. Limits of Computation • How long does it take to compute a results? • Are there problems for which no “efficient” algorithm can be created? • Are there problems for which no algorithmic solution can exist?

  20. Limits of Computation • Polynomial time algorithm • An algorithm with an execution time that is a polynomial function of the input size • Exponential time algorithm • An algorithm with an execution time that is an exponential function of the input size • Undecidable (or non-computable) problem • A problem for which no algorithm can exist • Halting problem

  21. Limits of Computation • Polynomial time algorithms • Linear search • N • Selection sort • N2 • Can we sort faster than N2? • MergeSort • Nlog2N

  22. Limits of Computation

More Related