Black-Box Testing Techniques III

Size: px
Start display at page:

Download "Black-Box Testing Techniques III"

Transcription

1 Black-Box Testing Techniques III Software Testing and Verification Lecture 6 Prepared by Stephen M. Thebaut, Ph.D. University of Florida

2 Another Cause-Effect Example: Symbol Table Storage Specification The conditions for storing an identifier in one of two symbol tables are: (a) must be from 2 to 8 characters in length; (b) first character must be a letter or $ ; (c) other characters must be a letter or digit. If the first character is a letter, the identifier will be stored in symbol table A. If the first character is $, it will be stored in symbol table B. If the first character is neither a letter nor $, or if condition (c) is not satisfied, error message J11 is output. If condition (a) is not satisfied, error message J12 is output.

3 Causes and Effects Causes: Effects: (1) 2 no. chars 8 (31) store in table A (2) 1 st char is letter (32) store in table B (3) 1 st char is $ (33) output msg J11 (4) other chars only letters/digits (34) output msg J12 only (35) output msgs J11 and J12

4 Boolean Graphs [2,8] (1) let (2) (31) > A E $ (3) (32) > B others let/dig (4)

5 Boolean Graphs (cont d) [2,8] (1) let (2) Л (31) > A E $ (3) (32) > B others let/dig (4)

6 Boolean Graphs (cont d) [2,8] (1) let (2) Л (31) > A E $ (3) Л (32) > B others let/dig (4)

7 Boolean Graphs (cont d) [2,8] (1) (33) J11 only let (2) E (34) J12 only $ (3) others let/dig (4) (35) J11 & J12

8 Boolean Graphs (cont d) [2,8] (1) Л (33) J11 only let (2) E Л (A) (34) J12 only $ others let/dig (3) (4) V (B) (35) J11 & J12

9 Boolean Graphs (cont d) [2,8] (1) Л (33) J11 only let (2) E Л (A) Л (34) J12 only $ others let/dig (3) (4) V (B) (35) J11 & J12

10 Boolean Graphs (cont d) [2,8] (1) Л (33) J11 only let (2) E Л (A) Л (34) J12 only $ others let/dig (3) (4) V (B) Л (35) J11 & J12

11 A Variation on Test Case Selection Strategy #3 Test case selection Strategy #3 (p. 32) considers ALL feasible combinations of connected Cause values that result in each Effect being True. For complex specifications, this can be impractical. We now consider a variation on this strategy which culls all but the combinations of greatest interest.

12 Test Case Selection Strategy #3 Plus Culling Rules REPEAT Select the next (initially, the first) Effect. Tracing back through the graph (right to left), find all feasible combinations of connected Cause values that result in the Effect being True, subject to the following culling rules: 1. When encountering an nth-degree OR-node that must be True, consider only those n combinations for which exactly one incoming edge is True.

13 Test Case Selection Strategy #3 Plus Culling Rules (cont d) 2. When encountering an nth-degree AND-node that must be False, consider only those n combinations for which exactly one incoming edge is False. For each new such combination found: Determine values of all other Effects, and Enter values for each Cause and Effect in a new column of the test case coverage matrix. UNTIL each Effect has been selected.

14 Rationale for these Culling Rules? Number of combinations decreases by a factor of O(2 n ) to O(n) at each true OR node and each false AND node. Idea: cover only the minimally sufficient conditions for the desired result. V( T Л( F

15 Applying Strategy #3 Plus Culling Rules [2,8] (1) let (2) Л (31) > A E $ (3) Л (32) > B others let/dig (4)

16 Coverage Matrix TEST CASES CAUSES no. chars 8 (1) T 1 st char is letter (2) T 1 st char is $ (3) F others letters/digits (4) T EFFECTS store in table A (31) T store in table B (32) F output J11 only (33) F output J12 only (34) F output J11 & J12 (35) F

17 Applying Strategy #3 Plus Culling Rules (cont d) [2,8] (1) let (2) Л (31) > A E $ (3) Л (32) > B others let/dig (4)

18 Coverage Matrix (cont d) TEST CASES CAUSES no. chars 8 (1) T T 1 st char is letter (2) T F 1 st char is $ (3) F T others letters/digits (4) T T EFFECTS store in table A (31) T F store in table B (32) F T output J11 only (33) F F output J12 only (34) F F output J11 & J12 (35) F F

19 Applying Strategy #3 Plus Culling Rules (cont d) [2,8] (1) Л (33) J11 only let (2) E Л (A) Л (34) J12 only $ others let/dig (3) (4) V (B) Л (35) J11 & J12

20 Applying Strategy #3 Plus Culling Rules (cont d) (33) 1, B B (A V 4) ( 4, A) V ( 4, A) V (4, A) (T,T) (T,F) (F,T) culled (rule 1)

21 Applying Strategy #3 Plus Culling Rules (cont d) (33) 1, 4, A 1, 4, A

22 Applying Strategy #3 Plus Culling Rules (cont d) (33) 1, 4, A 1, 4, A A 2, 3

23 Applying Strategy #3 Plus Culling Rules (cont d) (33) 1, 4, A 1, 4, 2, 3

24 Applying Strategy #3 Plus Culling Rules (cont d) (33) 1, 4, A A ( 2, 3) 1, 4, 2, 3

25 Applying Strategy #3 Plus Culling Rules (cont d) (33) 1, 4, A A ( 2, 3) (2, 3) V (2, 3) V ( 2, 3) culled (rule 2) and infeasible 1, 4, 2, 3 (F,F) (F,T) (T,F)

26 Applying Strategy #3 Plus Culling Rules (cont d) (33) 1, 4, 2, 3 1, 4, 2, 3 1, 4, 2, 3

27 Coverage Matrix (cont d) TEST CASES CAUSES no. chars 8 (1) T T T T T 1 st char is letter (2) T F T F F 1 st char is $ (3) F T F T F others letters/digits (4) T T F F T EFFECTS store in table A (31) T F F F F store in table B (32) F T F F F output J11 only (33) F F T T T output J12 only (34) F F F F F output J11 & J12 (35) F F F F F

28 Applying Strategy #3 Plus Culling Rules (cont d) [2,8] (1) Л (33) J11 only let (2) E Л (A) Л (34) J12 only $ others let/dig (3) (4) V (B) Л (35) J11 & J12

29 Applying Strategy #3 Plus Culling Rules (cont d) (34) 1, B B ( 4 V A) 4, A

30 Applying Strategy #3 Plus Culling Rules (cont d) (34) 1, 4, A

31 Applying Strategy #3 Plus Culling Rules (cont d) (34) 1, 4, A A ( 2, 3)

32 Applying Strategy #3 Plus Culling Rules (cont d) (34) 1, 4, A A ( 2, 3) (2, 3) V (2, 3) V ( 2, 3) (F,F) (F,T) (T,F) culled (rule 2) and infeasible

33 Applying Strategy #3 Plus Culling Rules (cont d) (34) 1, 4, 2, 3 1, 4, 2, 3

34 Coverage Matrix (cont d) TEST CASES CAUSES no. chars 8 (1) T T T T T F F 1 st char is letter (2) T F T F F T F 1 st char is $ (3) F T F T F F T others letters/digits (4) T T F F T T T EFFECTS store in table A (31) T F F F F F F store in table B (32) F T F F F F F output J11 only (33) F F T T T F F output J12 only (34) F F F F F T T output J11 & J12 (35) F F F F F F F

35 Applying Strategy #3 Plus Culling Rules (cont d) [2,8] (1) Л (33) J11 only let (2) E Л (A) Л (34) J12 only $ others let/dig (3) (4) V (B) Л (35) J11 & J12

36 Applying Strategy #3 Plus Culling Rules (cont d) (35) 1, B Which are just the conditions associated with error messages J11 (B) and J12 ( 1). Combining these conditions from (33) and (34) yields: (35) 1, 4, 2, 3 1, 4, 2, 3 1, 4, 2, 3

37 Coverage Matrix (cont d) TEST CASES CAUSES no. chars 8 (1) T T T T T F F F F F 1 st char is letter (2) T F T F F T F T F F 1 st char is $ (3) F T F T F F T F T F others letters/digits (4) T T F F T T T F F T EFFECTS store in table A (31) T F F F F F F F F F store in table B (32) F T F F F F F F F F output J11 only (33) F F T T T F F F F F output J12 only (34) F F F F F T T F F F output J11 & J12 (35) F F F F F F F T T T

38 Complete Coverage Matrix TEST CASES CAUSES no. chars 8 (1) T T T T T F F F F F 1 st char is letter (2) T F T F F T F T F F 1 st char is $ (3) F T F T F F T F T F others letters/digits (4) T T F F T T T F F T EFFECTS store in table A (31) T F F F F F F F F F store in table B (32) F T F F F F F F F F output J11 only (33) F F T T T F F F F F output J12 only (34) F F F F F T T F F F output J11 & J12 (35) F F F F F F F T T T

39 Cause-Effect Analysis: Discussion Questions & Exercises Under what circumstances should Cause-Effect Analysis be used for test case design? Are there any other obvious benefits? What are the pros and cons of having a set of mutually exclusive Effects?

40 Cause-Effect Analysis: Discussion Questions & Exercises (cont d) Suppose that some program Effect is associated with integer input X being either 30 or even. What are the pros and cons of defining { X X 30 V EVEN(X) } to be a Cause? Devise a scenario that illustrates some creative ideas for how a well-engineered CASE tool could effectively support Cause-Effect Analysis.

41 Cause-Effect Analysis: Discussion Questions & Exercises (cont d) Cause-Effect Analysis seems well suited for single-state-transition program models in which Causes are mapped to Effects in one conceptual step. How could you apply the strategy to multistate-transition program models?

42 Boundary Value Analysis A technique based on identifying, and generating test cases to explore boundary conditions. Boundary conditions are an extremely rich source of errors. Natural language based specifications of boundaries are often ambiguous, as in for input values of X between 0 and 40,...

43 Boundary Value Analysis (cont d) May be applied to both input and output conditions. Also applicable to white box testing (as will be illustrated later).

44 Guidelines for Identifying Boundary Values Range guideline: K will range in value from 0.0 to 4.0. Identify values at the endpoints of the range and just beyond. Boundary values: 0.0- (I) 0.0 (V) 4.0 (V) 4.0+ (I)

45 Guidelines for Identifying Boundary Values (cont d) Number of values guideline: The file will contain 1-25 records. Identify the minimum, the maximum, and values just below the minimum and above the maximum. Boundary values: empty file (I), file with 1 (V), 25 (V), and 26 (I) records

46 Boundary Value Analysis Exercise Identify appropriate boundary values for the following program specification fragment.

47 City Tax Specification 1: The first input is a yes/no response to the question Do you reside within the city? The second input is gross pay for the year in question. A non-resident will pay 1% of the gross pay in city tax. Residents pay on the following scale: - If gross pay is no more than $30,000, the tax is 1%. - If gross pay is more than $30,000, but no more than $50,000, the tax is 5%. - If gross pay is more than $50,000, the tax is 15%.

48 Test Case Design Based on Intuition and Experience Also known as Error Guessing, Ad Hoc Testing, Artistic Testing, etc. Testers utilize intuition and experience to identify potential errors and design test cases to reveal them. Guidelines: Design tests for reasonable but incorrect assumptions that may have been made by developers. (cont d)

49 Intuition and Experience (cont d) Guidelines: (cont d) Design tests to detect errors in handling special situations or cases. Design tests to explore unexpected or unusual program use or environmental scenarios.

50 Intuition and Experience (cont d) Examples of data conditions to explore: (1) (2) Repeated instances or occurrences (3) Repeated instances or occurrences (4) Bl anks or null char acters in strings (et c.) (-5) Negative numbers (#) Non-numeric values in numeric fields (or vic3 versa) (6789) Inputs that are too long or too short

51 Intuition and Experience (cont d) Testing based on intuition and experience can be extremely effective. Test plans should reflect the explicit allocation of resources for this activity. Consider the Try to break our system lunch is on us example

52 Intuition and Experience Exercise Using intuition and experience, identify tests you would want to design for a subroutine that is to input and sort a list of strings based on a user-specified field.

53 Black-Box Testing Techniques III Software Testing and Verification Lecture 6 Prepared by Stephen M. Thebaut, Ph.D. University of Florida

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions Summary of the previous lecture Recall that we mentioned the following topics: P: is the set of decision problems (or languages) that are solvable in polynomial time. NP: is the set of decision problems

More information

Turing Machines Part Three

Turing Machines Part Three Turing Machines Part Three What problems can we solve with a computer? What kind of computer? Very Important Terminology Let M be a Turing machine. M accepts a string w if it enters an accept state when

More information

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2)

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2) Algorithms and Theory of Computation Lecture 22: NP-Completeness (2) Xiaohui Bei MAS 714 November 8, 2018 Nanyang Technological University MAS 714 November 8, 2018 1 / 20 Set Cover Set Cover Input: a set

More information

Axiomatic Verification II

Axiomatic Verification II Axiomatic Verification II Software Testing and Verification Lecture Notes 18 Prepared by Stephen M. Thebaut, Ph.D. University of Florida Axiomatic Verification II Reasoning about iteration (while loops)

More information

Computation Theory Finite Automata

Computation Theory Finite Automata Computation Theory Dept. of Computing ITT Dublin October 14, 2010 Computation Theory I 1 We would like a model that captures the general nature of computation Consider two simple problems: 2 Design a program

More information

CS4800: Algorithms & Data Jonathan Ullman

CS4800: Algorithms & Data Jonathan Ullman CS4800: Algorithms & Data Jonathan Ullman Lecture 22: Greedy Algorithms: Huffman Codes Data Compression and Entropy Apr 5, 2018 Data Compression How do we store strings of text compactly? A (binary) code

More information

Path Testing and Test Coverage. Chapter 9

Path Testing and Test Coverage. Chapter 9 Path Testing and Test Coverage Chapter 9 Structural Testing Also known as glass/white/open box testing Structural testing is based on using specific knowledge of the program source text to define test

More information

Path Testing and Test Coverage. Chapter 9

Path Testing and Test Coverage. Chapter 9 Path Testing and Test Coverage Chapter 9 Structural Testing Also known as glass/white/open box testing Structural testing is based on using specific knowledge of the program source text to define test

More information

Predicate Transforms I

Predicate Transforms I Predicate Transforms I Software Testing and Verification Lecture Notes 19 Prepared by Stephen M. Thebaut, Ph.D. University of Florida Predicate Transforms I 1. Introduction: weakest pre-conditions (wp

More information

Proofs Propositions and Calculuses

Proofs Propositions and Calculuses Lecture 2 CS 1813 Discrete Mathematics Proofs Propositions and Calculuses 1 City of Königsberg (Kaliningrad) 2 Bridges of Königsberg Problem Find a route that crosses each bridge exactly once Must the

More information

9.1 SEQUENCES AND SERIES

9.1 SEQUENCES AND SERIES 640 Chapter 9 Sequences, Series, and Probability 9. SEQUENCES AND SERIES What you should learn Use sequence notation to write the terms of sequences. Use factorial notation. Use summation notation to write

More information

Integration and Higher Level Testing

Integration and Higher Level Testing Integration and Higher Level Testing Software Testing and Verification Lecture 11 Prepared by Stephen M. Thebaut, Ph.D. University of Florida Context Higher-level testing begins with the integration of

More information

COMPUTER SCIENCE TRIPOS

COMPUTER SCIENCE TRIPOS CST.2016.6.1 COMPUTER SCIENCE TRIPOS Part IB Thursday 2 June 2016 1.30 to 4.30 COMPUTER SCIENCE Paper 6 Answer five questions. Submit the answers in five separate bundles, each with its own cover sheet.

More information

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007) Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007) Problem 1: Specify two different predicates P (x) and

More information

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4 CSE 20 Lecture 4: Introduction to Boolean algebra Reminder First quiz will be on Friday (17th January) in class. It is a paper quiz. Syllabus is all that has been done till Wednesday. If you want you may

More information

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 BIJU PATNAIK UNIVERSITY OF TECHNOLOGY, ODISHA Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 Prepared by, Dr. Subhendu Kumar Rath, BPUT, Odisha. UNIT 2 Structure NON-DETERMINISTIC FINITE AUTOMATA

More information

CSC236H Lecture 2. Ilir Dema. September 19, 2018

CSC236H Lecture 2. Ilir Dema. September 19, 2018 CSC236H Lecture 2 Ilir Dema September 19, 2018 Simple Induction Useful to prove statements depending on natural numbers Define a predicate P(n) Prove the base case P(b) Prove that for all n b, P(n) P(n

More information

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Why Learning Logic? Logic. Propositional Logic. Compound Propositions Logic Objectives Propositions and compound propositions Negation, conjunction, disjunction, and exclusive or Implication and biconditional Logic equivalence and satisfiability Application of propositional

More information

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19 PROPOSITIONAL LOGIC VL Logik: WS 2018/19 (Version 2018.2) Martina Seidl (martina.seidl@jku.at), Armin Biere (biere@jku.at) Institut für Formale Modelle und Verifikation BOX Game: Rules 1. The game board

More information

Turing Machines Part III

Turing Machines Part III Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's

More information

Announcements. Problem Set 6 due next Monday, February 25, at 12:50PM. Midterm graded, will be returned at end of lecture.

Announcements. Problem Set 6 due next Monday, February 25, at 12:50PM. Midterm graded, will be returned at end of lecture. Turing Machines Hello Hello Condensed Slide Slide Readers! Readers! This This lecture lecture is is almost almost entirely entirely animations that that show show how how each each Turing Turing machine

More information

Counting Methods. CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo

Counting Methods. CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo Counting Methods CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo c Xin He (University at Buffalo) CSE 191 Discrete Structures 1 / 48 Need for Counting The problem of counting

More information

Complexity and NP-completeness

Complexity and NP-completeness Lecture 17 Complexity and NP-completeness Supplemental reading in CLRS: Chapter 34 As an engineer or computer scientist, it is important not only to be able to solve problems, but also to know which problems

More information

ENGI9496 Lecture Notes State-Space Equation Generation

ENGI9496 Lecture Notes State-Space Equation Generation ENGI9496 Lecture Notes State-Space Equation Generation. State Equations and Variables - Definitions The end goal of model formulation is to simulate a system s behaviour on a computer. A set of coherent

More information

COMPUTER SCIENCE TRIPOS

COMPUTER SCIENCE TRIPOS CST.2016.2.1 COMPUTER SCIENCE TRIPOS Part IA Tuesday 31 May 2016 1.30 to 4.30 COMPUTER SCIENCE Paper 2 Answer one question from each of Sections A, B and C, and two questions from Section D. Submit the

More information

MAT2345 Discrete Math

MAT2345 Discrete Math Fall 2013 General Syllabus Schedule (note exam dates) Homework, Worksheets, Quizzes, and possibly Programs & Reports Academic Integrity Do Your Own Work Course Web Site: www.eiu.edu/~mathcs Course Overview

More information

Theoretical Computer Science

Theoretical Computer Science Theoretical Computer Science Zdeněk Sawa Department of Computer Science, FEI, Technical University of Ostrava 17. listopadu 15, Ostrava-Poruba 708 33 Czech republic September 22, 2017 Z. Sawa (TU Ostrava)

More information

Lists, Stacks, and Queues (plus Priority Queues)

Lists, Stacks, and Queues (plus Priority Queues) Lists, Stacks, and Queues (plus Priority Queues) The structures lists, stacks, and queues are composed of similar elements with different operations. Likewise, with mathematics: (Z, +, 0) vs. (Z,, 1) List

More information

Induction and recursion. Chapter 5

Induction and recursion. Chapter 5 Induction and recursion Chapter 5 Chapter Summary Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms Mathematical Induction Section 5.1

More information

Chapter 0 Introduction. Fourth Academic Year/ Elective Course Electrical Engineering Department College of Engineering University of Salahaddin

Chapter 0 Introduction. Fourth Academic Year/ Elective Course Electrical Engineering Department College of Engineering University of Salahaddin Chapter 0 Introduction Fourth Academic Year/ Elective Course Electrical Engineering Department College of Engineering University of Salahaddin October 2014 Automata Theory 2 of 22 Automata theory deals

More information

Lecture 3: Finite Automata. Finite Automata. Deterministic Finite Automata. Summary. Dr Kieran T. Herley

Lecture 3: Finite Automata. Finite Automata. Deterministic Finite Automata. Summary. Dr Kieran T. Herley Lecture 3: Finite Automata Dr Kieran T. Herley Department of Computer Science University College Cork Summary Deterministic finite automata (DFA). Definition and operation of same. DFAs as string classifiers

More information

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 1 Chapter Summary Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 2 Section 5.1 3 Section Summary Mathematical Induction Examples of

More information

Finite Automata Part Two

Finite Automata Part Two Finite Automata Part Two DFAs A DFA is a Deterministic Finite Automaton A DFA is defined relative to some alphabet Σ. For each state in the DFA, there must be exactly one transition defined for each symbol

More information

Chapter 5. Finite Automata

Chapter 5. Finite Automata Chapter 5 Finite Automata 5.1 Finite State Automata Capable of recognizing numerous symbol patterns, the class of regular languages Suitable for pattern-recognition type applications, such as the lexical

More information

2.13 Maximum flow with a strictly positive initial feasible flow

2.13 Maximum flow with a strictly positive initial feasible flow ex-.-. Foundations of Operations Research Prof. E. Amaldi. Maximum flow and minimum cut iven the following network with capacities on the arcs find a maximum (feasible) flow from node to node, and determine

More information

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta CSE 2001: Introduction to Theory of Computation Fall 2012 Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cs.yorku.ca/course/2001 9/6/2012 CSE

More information

Notes on Pumping Lemma

Notes on Pumping Lemma Notes on Pumping Lemma Finite Automata Theory and Formal Languages TMV027/DIT321 Ana Bove, March 5th 2018 In the course we see two different versions of the Pumping lemmas, one for regular languages and

More information

Software Testing Lecture 5. Justin Pearson

Software Testing Lecture 5. Justin Pearson Software Testing Lecture 5 Justin Pearson 2017 1 / 34 Covering Logical Expressions Logic expression show up in many situations Covering logical expressions have a long history, many are the covering criteria

More information

Induction and Recursion

Induction and Recursion . All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Induction and Recursion

More information

UNIT-VIII COMPUTABILITY THEORY

UNIT-VIII COMPUTABILITY THEORY CONTEXT SENSITIVE LANGUAGE UNIT-VIII COMPUTABILITY THEORY A Context Sensitive Grammar is a 4-tuple, G = (N, Σ P, S) where: N Set of non terminal symbols Σ Set of terminal symbols S Start symbol of the

More information

Math 90 Lecture Notes Chapter 1

Math 90 Lecture Notes Chapter 1 Math 90 Lecture Notes Chapter 1 Section 1.1: Introduction to Algebra This textbook stresses Problem Solving! Solving problems is one of the main goals of mathematics. Think of mathematics as a language,

More information

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs CSE : Foundations of Computing Lecture : Finite State Machine Minimization & NFAs State Minimization Many different FSMs (DFAs) for the same problem Take a given FSM and try to reduce its state set by

More information

Counting Strategies: Inclusion/Exclusion, Categories

Counting Strategies: Inclusion/Exclusion, Categories Counting Strategies: Inclusion/Exclusion, Categories CSE21 Winter 2017, Day 16 (B00), Day 11 (A00) February 17, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Sum rule For any disjoint sets, A and B: A

More information

Aside: Golden Ratio. Golden Ratio: A universal law. Golden ratio φ = lim n = 1+ b n = a n 1. a n+1 = a n + b n, a n+b n a n

Aside: Golden Ratio. Golden Ratio: A universal law. Golden ratio φ = lim n = 1+ b n = a n 1. a n+1 = a n + b n, a n+b n a n Aside: Golden Ratio Golden Ratio: A universal law. Golden ratio φ = lim n a n+b n a n = 1+ 5 2 a n+1 = a n + b n, b n = a n 1 Ruta (UIUC) CS473 1 Spring 2018 1 / 41 CS 473: Algorithms, Spring 2018 Dynamic

More information

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta CSE 2001: Introduction to Theory of Computation Fall 2013 Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.eecs.yorku.ca/course/2001 9/10/2013

More information

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3 6.841/18.405J: Advanced Complexity Wednesday, February 12, 2003 Lecture Lecture 3 Instructor: Madhu Sudan Scribe: Bobby Kleinberg 1 The language MinDNF At the end of the last lecture, we introduced the

More information

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics CS256/Spring 2008 Lecture #11 Zohar Manna Beyond Temporal Logics Temporal logic expresses properties of infinite sequences of states, but there are interesting properties that cannot be expressed, e.g.,

More information

Course Staff. Textbook

Course Staff. Textbook Course Staff CS311H: Discrete Mathematics Intro and Propositional Logic Instructor: Işıl Dillig Instructor: Prof. Işıl Dillig TAs: Jacob Van Geffen, Varun Adiga, Akshay Gupta Class meets every Monday,

More information

Lecture 18: P & NP. Revised, May 1, CLRS, pp

Lecture 18: P & NP. Revised, May 1, CLRS, pp Lecture 18: P & NP Revised, May 1, 2003 CLRS, pp.966-982 The course so far: techniques for designing efficient algorithms, e.g., divide-and-conquer, dynamic-programming, greedy-algorithms. What happens

More information

VARIABLES, TERMS, AND EXPRESSIONS COMMON CORE ALGEBRA II

VARIABLES, TERMS, AND EXPRESSIONS COMMON CORE ALGEBRA II Name: Date: VARIABLES, TERMS, AND EXPRESSIONS COMMON CORE ALGEBRA II Mathematics has developed a language all to itself in order to clarify concepts and remove ambiguity from the analysis of problems.

More information

CISC4090: Theory of Computation

CISC4090: Theory of Computation CISC4090: Theory of Computation Chapter 2 Context-Free Languages Courtesy of Prof. Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Spring, 2014 Overview In Chapter

More information

Finite-State Machines (Automata) lecture 12

Finite-State Machines (Automata) lecture 12 Finite-State Machines (Automata) lecture 12 cl a simple form of computation used widely one way to find patterns 1 A current D B A B C D B C D A C next 2 Application Fields Industry real-time control,

More information

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity 1 CS 350 Algorithms and Complexity Fall 2015 Lecture 15: Limitations of Algorithmic Power Introduction to complexity theory Andrew P. Black Department of Computer Science Portland State University Lower

More information

Linear Temporal Logic and Büchi Automata

Linear Temporal Logic and Büchi Automata Linear Temporal Logic and Büchi Automata Yih-Kuen Tsay Department of Information Management National Taiwan University FLOLAC 2009 Yih-Kuen Tsay (SVVRL @ IM.NTU) Linear Temporal Logic and Büchi Automata

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation LECTURE 24 Last time Relationship between models: deterministic/nondeterministic Class P Today Class NP Sofya Raskhodnikova Homework 9 due Homework 0 out 4/5/206 L24. I-clicker

More information

Introduction. Pvs.NPExample

Introduction. Pvs.NPExample Introduction Computer Science & Engineering 423/823 Design and Analysis of Algorithms Lecture 09 NP-Completeness (Chapter 34) Stephen Scott (Adapted from Vinodchandran N. Variyam) sscott@cse.unl.edu I

More information

Limitations of Algorithm Power

Limitations of Algorithm Power Limitations of Algorithm Power Objectives We now move into the third and final major theme for this course. 1. Tools for analyzing algorithms. 2. Design strategies for designing algorithms. 3. Identifying

More information

NP, polynomial-time mapping reductions, and NP-completeness

NP, polynomial-time mapping reductions, and NP-completeness NP, polynomial-time mapping reductions, and NP-completeness In the previous lecture we discussed deterministic time complexity, along with the time-hierarchy theorem, and introduced two complexity classes:

More information

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II 2015-16, Max 80, Time 2 hr Name Entry No. Group Note (i) Write your answers neatly and precisely in the space provided with

More information

E23: Hotel Management System Wen Yunlu Hu Xing Chen Ke Tang Haoyuan Module: EEE 101

E23: Hotel Management System Wen Yunlu Hu Xing Chen Ke Tang Haoyuan Module: EEE 101 E23: Hotel Management System Author: 1302509 Zhao Ruimin 1301478 Wen Yunlu 1302575 Hu Xing 1301911 Chen Ke 1302599 Tang Haoyuan Module: EEE 101 Lecturer: Date: Dr.Lin December/22/2014 Contents Contents

More information

n CS 160 or CS122 n Sets and Functions n Propositions and Predicates n Inference Rules n Proof Techniques n Program Verification n CS 161

n CS 160 or CS122 n Sets and Functions n Propositions and Predicates n Inference Rules n Proof Techniques n Program Verification n CS 161 Discrete Math at CSU (Rosen book) Sets and Functions (Rosen, Sections 2.1,2.2, 2.3) TOPICS Discrete math Set Definition Set Operations Tuples 1 n CS 160 or CS122 n Sets and Functions n Propositions and

More information

Ch. 3 Equations and Inequalities

Ch. 3 Equations and Inequalities Ch. 3 Equations and Inequalities 3.1 Solving Linear Equations Graphically There are 2 methods presented in this section for solving linear equations graphically. Normally I would not cover solving linear

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation LECTURE 25 Last time Class NP Today Polynomial-time reductions Adam Smith; Sofya Raskhodnikova 4/18/2016 L25.1 The classes P and NP P is the class of languages decidable

More information

INF2220: algorithms and data structures Series 1

INF2220: algorithms and data structures Series 1 Universitetet i Oslo Institutt for Informatikk I. Yu, D. Karabeg INF2220: algorithms and data structures Series 1 Topic Function growth & estimation of running time, trees (Exercises with hints for solution)

More information

LESSON #1: VARIABLES, TERMS, AND EXPRESSIONS COMMON CORE ALGEBRA II

LESSON #1: VARIABLES, TERMS, AND EXPRESSIONS COMMON CORE ALGEBRA II 1 LESSON #1: VARIABLES, TERMS, AND EXPRESSIONS COMMON CORE ALGEBRA II Mathematics has developed a language all to itself in order to clarify concepts and remove ambiguity from the analysis of problems.

More information

CSCI3390-Lecture 14: The class NP

CSCI3390-Lecture 14: The class NP CSCI3390-Lecture 14: The class NP 1 Problems and Witnesses All of the decision problems described below have the form: Is there a solution to X? where X is the given problem instance. If the instance is

More information

Bob Brown Math 251 Calculus 1 Chapter 4, Section 1 Completed 1 CCBC Dundalk

Bob Brown Math 251 Calculus 1 Chapter 4, Section 1 Completed 1 CCBC Dundalk Bob Brown Math 251 Calculus 1 Chapter 4, Section 1 Completed 1 Absolute (or Global) Minima and Maxima Def.: Let x = c be a number in the domain of a function f. f has an absolute (or, global ) minimum

More information

Computer Science Introductory Course MSc - Introduction to Java

Computer Science Introductory Course MSc - Introduction to Java Computer Science Introductory Course MSc - Introduction to Java Lecture 1: Diving into java Pablo Oliveira ENST Outline 1 Introduction 2 Primitive types 3 Operators 4 5 Control Flow

More information

9.4. Mathematical Induction. Introduction. What you should learn. Why you should learn it

9.4. Mathematical Induction. Introduction. What you should learn. Why you should learn it 333202_090.qxd 2/5/05 :35 AM Page 73 Section 9. Mathematical Induction 73 9. Mathematical Induction What you should learn Use mathematical induction to prove statements involving a positive integer n.

More information

Testability. Shaahin Hessabi. Sharif University of Technology. Adapted from the presentation prepared by book authors.

Testability. Shaahin Hessabi. Sharif University of Technology. Adapted from the presentation prepared by book authors. Testability Lecture 6: Logic Simulation Shaahin Hessabi Department of Computer Engineering Sharif University of Technology Adapted from the presentation prepared by book authors Slide 1 of 27 Outline What

More information

Math.3336: Discrete Mathematics. Combinatorics: Basics of Counting

Math.3336: Discrete Mathematics. Combinatorics: Basics of Counting Math.3336: Discrete Mathematics Combinatorics: Basics of Counting Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

MULTIPLE CHOICE QUESTIONS DECISION SCIENCE

MULTIPLE CHOICE QUESTIONS DECISION SCIENCE MULTIPLE CHOICE QUESTIONS DECISION SCIENCE 1. Decision Science approach is a. Multi-disciplinary b. Scientific c. Intuitive 2. For analyzing a problem, decision-makers should study a. Its qualitative aspects

More information

CMPSCI 311: Introduction to Algorithms Second Midterm Exam

CMPSCI 311: Introduction to Algorithms Second Midterm Exam CMPSCI 311: Introduction to Algorithms Second Midterm Exam April 11, 2018. Name: ID: Instructions: Answer the questions directly on the exam pages. Show all your work for each question. Providing more

More information

MAS275 Probability Modelling Exercises

MAS275 Probability Modelling Exercises MAS75 Probability Modelling Exercises Note: these questions are intended to be of variable difficulty. In particular: Questions or part questions labelled (*) are intended to be a bit more challenging.

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 26 Computational Intractability Polynomial Time Reductions Sofya Raskhodnikova S. Raskhodnikova; based on slides by A. Smith and K. Wayne L26.1 What algorithms are

More information

(a) Definition of TMs. First Problem of URMs

(a) Definition of TMs. First Problem of URMs Sec. 4: Turing Machines First Problem of URMs (a) Definition of the Turing Machine. (b) URM computable functions are Turing computable. (c) Undecidability of the Turing Halting Problem That incrementing

More information

CS5371 Theory of Computation. Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL, DPDA PDA)

CS5371 Theory of Computation. Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL, DPDA PDA) CS5371 Theory of Computation Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL, DPDA PDA) Objectives Introduce the Pumping Lemma for CFL Show that some languages are non- CFL Discuss the DPDA, which

More information

National Center for Geographic Information and Analysis. A Comparison of Strategies for Data Storage Reduction in Location-Allocation Problems

National Center for Geographic Information and Analysis. A Comparison of Strategies for Data Storage Reduction in Location-Allocation Problems National Center for Geographic Information and Analysis A Comparison of Strategies for Data Storage Reduction in Location-Allocation Problems by Paul A. Sorensen Richard L. Church University of California,

More information

Algorithms for Data Science

Algorithms for Data Science Algorithms for Data Science CSOR W4246 Eleni Drinea Computer Science Department Columbia University Tuesday, December 1, 2015 Outline 1 Recap Balls and bins 2 On randomized algorithms 3 Saving space: hashing-based

More information

Statistical Theory 1

Statistical Theory 1 Statistical Theory 1 Set Theory and Probability Paolo Bautista September 12, 2017 Set Theory We start by defining terms in Set Theory which will be used in the following sections. Definition 1 A set is

More information

1 Alphabets and Languages

1 Alphabets and Languages 1 Alphabets and Languages Look at handout 1 (inference rules for sets) and use the rules on some examples like {a} {{a}} {a} {a, b}, {a} {{a}}, {a} {{a}}, {a} {a, b}, a {{a}}, a {a, b}, a {{a}}, a {a,

More information

Summary of the simplex method

Summary of the simplex method MVE165/MMG631,Linear and integer optimization with applications The simplex method: degeneracy; unbounded solutions; starting solutions; infeasibility; alternative optimal solutions Ann-Brith Strömberg

More information

Introduction to Theory of Computing

Introduction to Theory of Computing CSCI 2670, Fall 2012 Introduction to Theory of Computing Department of Computer Science University of Georgia Athens, GA 30602 Instructor: Liming Cai www.cs.uga.edu/ cai 0 Lecture Note 3 Context-Free Languages

More information

Lecture 11 Linear programming : The Revised Simplex Method

Lecture 11 Linear programming : The Revised Simplex Method Lecture 11 Linear programming : The Revised Simplex Method 11.1 The Revised Simplex Method While solving linear programming problem on a digital computer by regular simplex method, it requires storing

More information

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete CS125 Lecture 15 Fall 2016 15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete Already know SAT NP, so only need to show SAT is NP-hard. Let L be any language in NP. Let M be a NTM that decides L

More information

1 Reals are Uncountable

1 Reals are Uncountable CS 30: Discrete Math in CS (Winter 2019): Lecture 6 Date: 11th January, 2019 (Friday) Topic: Uncountability and Undecidability Disclaimer: These notes have not gone through scrutiny and in all probability

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

Introduction to Theoretical Computer Science. Motivation. Automata = abstract computing devices

Introduction to Theoretical Computer Science. Motivation. Automata = abstract computing devices Introduction to Theoretical Computer Science Motivation Automata = abstract computing devices Turing studied Turing Machines (= computers) before there were any real computers We will also look at simpler

More information

Finite Automata Part Two

Finite Automata Part Two Finite Automata Part Two Recap from Last Time Old MacDonald Had a Symbol, Σ-eye-ε-ey, Oh! You may have noticed that we have several letter- E-ish symbols in CS103, which can get confusing! Here s a quick

More information

Mathematical Foundations of Programming. Nicolai Kraus. Draft of February 15, 2018

Mathematical Foundations of Programming. Nicolai Kraus. Draft of February 15, 2018 Very short lecture notes: Mathematical Foundations of Programming University of Nottingham, Computer Science, module code G54FOP, Spring 2018 Nicolai Kraus Draft of February 15, 2018 What is this? This

More information

Chapter 2. Polynomial and Rational Functions. 2.5 Zeros of Polynomial Functions

Chapter 2. Polynomial and Rational Functions. 2.5 Zeros of Polynomial Functions Chapter 2 Polynomial and Rational Functions 2.5 Zeros of Polynomial Functions 1 / 33 23 Chapter 2 Homework 2.5 p335 6, 8, 10, 12, 16, 20, 24, 28, 32, 34, 38, 42, 46, 50, 52 2 / 33 23 3 / 33 23 Objectives:

More information

Lecture 11: Measuring the Complexity of Proofs

Lecture 11: Measuring the Complexity of Proofs IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Advanced Course on Computational Complexity Lecture 11: Measuring the Complexity of Proofs David Mix Barrington and Alexis Maciel July

More information

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity CS 350 Algorithms and Complexity Winter 2019 Lecture 15: Limitations of Algorithmic Power Introduction to complexity theory Andrew P. Black Department of Computer Science Portland State University Lower

More information

Math 5490 Network Flows

Math 5490 Network Flows Math 90 Network Flows Lecture 8: Flow Decomposition Algorithm Stephen Billups University of Colorado at Denver Math 90Network Flows p./6 Flow Decomposition Algorithms Two approaches to modeling network

More information

CSE 105 Theory of Computation

CSE 105 Theory of Computation CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Today s Agenda Quick Review of CFG s and PDA s Introduction to Turing Machines and their Languages Reminders and

More information

Logic Coverage Active Clause Coverage

Logic Coverage Active Clause Coverage Logic Coverage Active Clause Coverage CS 4501 / 6501 Software Testing [Ammann and Offutt, Introduction to Software Testing, Ch. 8] 1 Active Clause Coverage (ACC) From the testing perspective, we would

More information

Introduction to Automata

Introduction to Automata Introduction to Automata Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr 1 /

More information

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa CS:4330 Theory of Computation Spring 2018 Regular Languages Finite Automata and Regular Expressions Haniel Barbosa Readings for this lecture Chapter 1 of [Sipser 1996], 3rd edition. Sections 1.1 and 1.3.

More information

Algorithms: COMP3121/3821/9101/9801

Algorithms: COMP3121/3821/9101/9801 NEW SOUTH WALES Algorithms: COMP3121/3821/9101/9801 Aleks Ignjatović School of Computer Science and Engineering University of New South Wales TOPIC 4: THE GREEDY METHOD COMP3121/3821/9101/9801 1 / 23 The

More information