Black-box testing TDDD04 Lecture 2
|
|
- Gilbert Chase
- 6 years ago
- Views:
Transcription
1 Black-box testing TDDD04 Lecture 2 Ola Leifler
2 Unit testing Different kinds of unit testing Code inspections Code walkthroughs Black-box testing White-box testing Determines what the inputs are Determines how inputs are constructed Input Unit under test (Test object, SUT) Output PASS Oracle FAIL 2 TDDD04 Software Testing
3 Efficiency of fault detection methods For requirements defects, no empirical evidence exists at all, but the fact that costs for requirements inspections are low compared to implementing incorrect requirements indicates that reviewers should look for requirements defects through inspection. For design specification defects, the case studies and one experiment indicate that inspections are both more efficient and more effective than functional testing. For code, functional or structural testing is ranked more effective or efficient than inspection in most studies. Some studies conclude that testing and inspection find different kinds of defects, so they are complementary. Results differ when studying fault isolation and not just defect detection. P. Runeson, C. Andersson, T. Thelin, A. Andrews, and T. Berling. What do we know about defect detection methods? IEEE Software, 23(3):82 90, May TDDD04 Software Testing
4 Black-box Testing 1. Exhaustive testing 2. Equivalence class testing (Equivalence Partitioning) (chapter 3) 3. Boundary value analysis (chapter 4) 4. Decision table testing (chapter 5) 5. Pairwise testing (chapter 6) 6. State-Transition testing (chapter 7) 7. Domain analysis testing (chapter 8) 8. Use case testing (chapter 9) 4
5 Equivalence class testing Ola Leifler Equivalence Class (EC) testing is a technique used to reduce the number of test cases to a manageable level while still maintaining reasonable test coverage Each EC consists of a set of data that is treated the same by the module or that should produce the same result. Any data value within a class is equivalent, in terms of testing, to any other value Choose one point within each EC to test Discuss: Problems? Weaknesses? 5 TDDD04 Software Testing
6 Identifying equivalence classes Ola Leifler Look for conditions and tables in the specification that partition the input space. Input ExamplesResult 0-1 Infant 1-12 Child Teen 20+ Adult If all three input values are the same, then return EQUILATERAL. If two input values are the same, and the third is different, then return ISOSCELESE. If all three values are different from each other, then return SCALENE. Also look for invalid equivalence classes inputs outside the specification! 6 TDDD04 Software Testing
7 Ola Leifler Example: NextDate Problem statement: NextDate is a function of three variables: month (M), day (D) and year (Y). It returns the date of the day after the input date. The month, day and year variables have integer values subject to these conditions: C1: 1 <= month <=12; C2: 1<= day <= 31; C3: 1850 <= year <= 2050 Valid ECs: M1 = {month: 1 <= month <= 12} D1 = {day: 1 <= day <= 31} Y1 = {year: 1850 <= year <= 2050} Invalid ECs: M2 = {month: month < 1} M2 = {month: month > 12} D2 = {day: day < 1} What about combinations of M,D & Y? 7 TDDD04 Software Testing
8 Guidelines Ola Leifler 1. If an input condition specifies a range of values; identify one valid EC and two invalid EC. 2. If an input condition specifies the number (e.g., one through 6 owners can be listed for the automobile); identify one valid EC and two invalid EC (no owners; more than 6 owners). 3. If an input condition specifies a set of input values and there is reason to believe that each is handled differently by the program; identify a valid EC for each and one invalid EC. 4. If an input condition specifies a must be situation (e.g., first character of the identifier must be a letter); identify one valid EC (it is a letter) and one invalid EC (it is not a letter) 5. If there is any reason to believe that elements in an EC are not handled in an identical manner by the program, split the equivalence class into smaller equivalence classes. 8 TDDD04 Software Testing
9 Applicability and limitations Ola Leifler Most suited to systems in which much of the input data takes on values within ranges or within sets. It makes the assumption that data in the same EC is, in fact, processed in the same way by the system. The simplest way to validate this assumption is to ask the programmer about their implementation. EC testing is equally applicable at the unit, integration, system, and acceptance test levels. All it requires are inputs or outputs that can be partitioned based on the system s requirements. 9 TDDD04 Software Testing
10 Black-box Testing 1. Exhaustive testing 2. Equivalence class testing (Equivalence Partitioning) (chapter 3) 3. Boundary value analysis (chapter 4) 4. Decision table testing (chapter 5) 5. Pairwise testing (chapter 6) 6. State-Transition testing (chapter 7) 7. Domain analysis testing (chapter 8) 8. Use case testing (chapter 9) 10
11 Boundary value testing Ola Leifler Boundary value testing focuses on the boundaries between equivalence classes, simply because that is where so many defects hide. The defects can be in the requirements or in the code Method 1. Identify the equivalence classes. 2. Identify the boundaries of each EC. 3. Create test cases for each boundary value by choosing one point on the boundary, one point just below the boundary, and one point just above the boundary. 11 TDDD04 Software Testing
12 Example Ola Leifler Input Result 0 <= x < 1 Infant 1 <= x < 13 Child 13 <= x < 20 Teen 20 <= x <= 120 Adult Boundary Below On Above Add to each: Identity Expected value 12 TDDD04 Software Testing
13 Applicability and limitations Ola Leifler Boundary value testing is equally applicable at the unit, integration, system, and acceptance test levels. All it requires are inputs that can be partitioned and boundaries that can be identified based on the system s requirements. Most suited to systems in which much of the input data takes on values within ranges or within sets. It makes the assumption that the program contains no extra boundaries. These can be found through inspection or white-box texting. Boundary value testing subsumes equivalence class testing 13 TDDD04 Software Testing
14 Black-box Testing 1. Exhaustive testing 2. Equivalence class testing (Equivalence Partitioning) (chapter 3) 3. Boundary value analysis (chapter 4) 4. Decision table testing (chapter 5) 5. Pairwise testing (chapter 6) 6. State-Transition testing (chapter 7) 7. Domain analysis testing (chapter 8) 8. Use case testing (chapter 9) 14
15 4. Decision Table Testing Decision tables are an excellent tool to capture certain kinds of system requirements and to document internal system design. They are used to record complex business rules that a system must implement. In addition, they can serve as a guide to creating test cases. 15
16 Decision tables The general format of a decision table: Condition-1 Rule 1 Rule 2 Rule p Conditions Condition-2 Condition-m Action-1 Actions Action-2 Action-n 16
17 Example Decisions for bank transactions (totally imaginary): R1 R2 R3 R4 R5 R6 R7 R8 Sufficient funds Y Y Y Y N N N N Conditions Good credit Y Y N N Y Y N N Bank is creditor Y N Y N Y N Y N Execute transaction X X X X X X Actions Charge overdraft X X Send warning X X X Send to collections X 17
18 Decision tables R1-R4 R5 R6 R7 R8 C1 Y N N N N Conditions C2 - Y Y N N C3 - <= 2 >2, <=3 >3, <=4 >4 A1 X X X Actions A2 X X A3 X X X Limited entries Extended entries Don t-care-entry condition is irrelevant or not applicable; any value is OK Limited entry table conditions are binary only Extended entry table conditions may take on multiple values Decision tables are declarative order between entries does not matter 18
19 Testing using decision tables Rules become test cases Conditions become inputs Actions become expected results: Condition-1 Test case 1 Test case 2 Test case p Inputs Condition-2 Condition-m Action-1 Expected results Action-2 Action-n 19
20 Triangle program The program accepts three integers, a, b, and c as input. The three values are interpreted as representing the lengths of sides of a triangle. The integers a, b, and c must satisfy the following conditions: a, b, c forms a triangle, i.e. a < b + c b < a + c c < a + b 20
21 Decision table for the triangle program R1 R2 R3 R4 R5 R6 R7 R8 R9 a,b,c forms a triangle N Y Y Y Y Y Y Y Y a = b - Y Y Y Y N N N N Conditions a = c - Y Y N N Y Y N N b = c - Y N Y N Y N Y N Not a triangle X Actions Scalene Isosceles Eqiulateral X If it is not a triangle, the other conditions don t matter If one side equals the other two, then the other two must also be the same Some conditions are therefore impossible
22 Decision table for the triangle program R1 R2 R3 R4 R5 R6 R7 R8 R9 a,b,c forms a triangle N Y Y Y Y Y Y Y Y Co ndi a = b - Y Y Y Y N N N N tio ns a = c - Y Y N N Y Y N N b = c - Y N Y N Y N Y N Not a triangle X Ac X tio Impossible Impossible Impossible ns Isosceles X X X Eqiulateral X
23 Testing the triangle program a b c Exp Conditions Actions a < b + c b < a + c c < a + b a = b a = c b = c Not a triangle Scalene Isosceles Eqiulateral T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11
24 Testing the triangle program Conditions a < b + c N b < a + c - c < a + b - a = b - a = c - b = c - a b c Exp T NaT T2 T3 T4 T5 T6 Not a triangle X T7 Actions Scalene Isosceles Eqiulateral T8 T9 T10 T11
25 Testing the triangle program Conditions Actions a < b + c F T T T b < a + c - F T T c < a + b - - F T a = b T a = c T b = c T Not a triangle X X X Scalene Isosceles a b c Exp T NaT T NaT T NaT T Eq T5 T6 T7 T8 T9 Eqiulateral X T10 T11
26 Testing the triangle program a < b + c F T T T T T T t t t T b < a + c - F T T T T T t t T T Co ndi c < a + b - - F T T T T T T T T tio ns a = b T T T F T F F F a = c T T F F F T T F b = c T F T F F F T T Not a triangle X X X Act ion Scalene X s Isosceles X X X Eqiulateral X a b c Exp T NaT T NaT T NaT T Eq T5 T6 T Sc T Iso T Iso T10 T Iso
27 Testing the triangle program a < b + c F T T T T T b < a + c - F T T T T Co ndi c < a + b - - F T T T tio ns a = b T T T a = c T T F b = c T F T Not a triangle X X X Act ion Scalene s Isosceles a b c Exp T NaT T NaT T NaT T Eq T T T7 T8 T9 Eqiulateral X T10 T11
28 Testing the triangle program a < b + c F T T T T T T T T T T b < a + c - F T T T T T T T T T Co ndi c < a + b - - F T T T T T T T T tio ns a = b T T T T F F F F a = c T T F F T T F F b = c T F T F T F T F Not a triangle X X X a b c Exp T NaT T NaT T NaT T Eq T T T Iso Act ion Scalene s Isosceles X X X X T T Iso Eqiulateral X T Iso T Sca
29 How many test cases If there are n conditions, there must be 2 n rules Each don t care makes that rule count double If there are m don t care entries in a rule, that rule counts as 2 m rules a < b + c F T T T b < a + c - F T T Co ndi c < a + b - - F T tio ns a = b T a = c T b = c T Rule count?? 8 1
30 The NextDate Function Triangle program: relationships between inputs and correct outputs. NextDate function: logical relationships among the input variables. Problem statement: NextDate is a function of three variables: month, day and year. It returns the date of the day after the input date. The month, day and year variables have integer values subject to these conditions: C1: 1 <= month <=12 C2: 1<= day <= 31 C3: 1850 <= year <=
31 Complexity The rule that determines when a year is a leap year: A year is days long. Declaring a leap year every fourth year, a slight error would occur. The Gregorian Calendar (after Pope Gregory) resolves this by adjusting leap years on century years. Thus, a year is a leap year if it is dividable by 4, unless it is a century year. Century years are leap years only if they are multiples of 400 (Inglis, 1961); so 1992, 1996, and 2000 are leap years, while the year 1900 is not a leap years. 31
32 The NextDate function Conditions Actions month in M30 T month in M31 - T - - month = T - month = T 1 <= day <=27 T T - T day = T - day = day = day = leap year F F F F Increment year Increment month X Increment day X X X Reset year Reset month Reset day X How about when you generate automated tests based on these entries?
33 Mutually exclusive conditions C1 T - - Conditions C2 - T - C3 - - T There should be eight rules total Rule count is 4 for each rule Gives total of 12 rules! Why? A1 X Actions A2 X A3 X Which actions apply to T,F,T A1 or A3 or both? Solution Be explicit to avoid overlaps Include impossible pseudo-action Use extended entries if possible
34 The NextDate function month in M30 M30 M30 M31 M31 M12 M12 M2 M2 M2 M2 M2 M2 Conditions day in D27 D28 D29 D30 D31 D27 D28 D29 D30 D31 D27 D28 D29 D30 D31 D27 D28 D28 D29 D29 year in YL YN YL YN - Increment year Increment month X X X X X D30 D31 Increment day X X X X X Actions Reset year Reset month X Reset day X X X X X Error X X X M31 = { 1,3,5,7,8,10 }; M30 = { 4,6,9,11 }; M2 = { 2 }; M12 = { 12 } D27 = { 1, 2,, 27 }; D28 = { 28 }, D29 = { 29 }, D30 = { 30 }, D31 = { 31 } YN = not a leap year; YL = leap year
35 Test cases for NextDate Case ID Month Day Year Expected Output 1-3 April April 16, April May 1, April Error 6-9 January January 16, January February 1, December December 16, December January 1, February February 16, February February 29, February March 1, February March 1, February Error 21, 22 February Error 35
36 Applicability and Limitations Decision table testing can be used whenever the system must implement complex business rules when these rules can be represented as a combination of conditions and when these conditions have discrete actions associated with them. 36
37 Pairwise Testing 1. Exhaustive testing 2. Equivalence class testing (Equivalence Partitioning) (chapter 3) 3. Boundary value analysis (chapter 4) 4. Decision table testing (chapter 5) 5. Pairwise testing (chapter 6) 6. State-Transition testing (chapter 7) 7. Domain analysis testing (chapter 8) 8. Use case testing (chapter 9) 37
38 Pairwise testing 20 parameters, 10 values each = 10^20 combinations Test pairs only, and ensure each pair of parameter values exists at least once: All-pairs algorithm Latin square Orthogonal array
39 Black-box Testing 1. Exhaustive testing 2. Equivalence class testing (Equivalence Partitioning) (chapter 3) 3. Boundary value analysis (chapter 4) 4. Decision table testing (chapter 5) 5. Pairwise testing (chapter 6) read on your own 6. State-Transition testing (chapter 7) 7. Domain analysis testing (chapter 8) 8. Use case testing (chapter 9) 39
40 State-transition testing When a system must remember something about what has happened before or when valid and invalid orders of operations exist. State-Transition diagrams direct testing efforts by identifying the states, events, actions, and transitions that should be tested. 40
41 State transition diagrams Start giveinfo /startpaytimer Current state Event Action Next state ReservationMade paymoney usercancelled Paid CustomerCancelled Start giveinfo startpaytimer Reservation Made Reservation Made paymoney usercancelled Reservation Made Paid Customer Cancelled Ticketed Model-based testing may rely on state transition diagrams Used
42 Creating test cases Create a set of test cases such that all states are visited at least once. May miss important transitions. Create a set of test cases such that all events are triggered at least once. May miss both states and transitions. Create a set of test cases such that all transitions are exercised at least once. Subsumes (includes) all-states and all-events. Stronger: cover all possible pairs of transitions Even stronger: cover all possible triplets of transitions Create a set of test cases such that all paths are executed at least once. Subsumes all others. Can be infeasible consider loops. 42
43 Wait For Pin State transition testing pinentered Second pinbad First Events Expected states pinbad pinok Third pinok Cover all states Cover all events Cover all transitions pinbad pinok Eat card Unlock
44 Applicability and Limitations Excellent to capture certain system requirements. Not applicable when the system has no state Frequently inapplicable if the system does not need to respond to outside events 44
45 Black-box Testing 1. Exhaustive testing 2. Equivalence class testing (Equivalence Partitioning) (chapter 3) 3. Boundary value analysis (chapter 4) 4. Decision table testing (chapter 5) 5. Pairwise testing (chapter 6) read on your own 6. State-Transition testing (chapter 7) 7. Domain analysis testing (chapter 8) 8. Use case testing (chapter 9) 45
46 Domain analysis testing Testing of multiple variables simultaneously. It builds on and generalizes equivalence class and boundary value testing. Is usually applied to one input variable or two simple combinations of two variables, based on specifications. 46
47 Test cases For each relationship (>=, >, <=, or <) choose one on point and one off point. For each strict equality condition (=) choose one on point and two off points, one slightly less than the conditional value and one slightly greater than the value. 47
48 Applicability and Limitations Applicable when multiple variables should be tested together either for efficiency or because of a logical interaction. Best suited to numeric values. 48
49 Black-box Testing 1. Exhaustive testing 2. Equivalence class testing (Equivalence Partitioning) (chapter 3) 3. Boundary value analysis (chapter 4) 4. Decision table testing (chapter 5) 5. Pairwise testing (chapter 6) read on your own 6. State-Transition testing (chapter 7) 7. Domain analysis testing (chapter 8) 8. Use case testing (chapter 9) read on your own 49
50 Black-box Testing 1. Exhaustive testing 2. Equivalence class testing (Equivalence Partitioning) (chapter 3) 3. Boundary value analysis (chapter 4) 4. Decision table testing (chapter 5) 5. Pairwise testing (chapter 6) read on your own 6. State-Transition testing (chapter 7) 7. Domain analysis testing (chapter 8) 8. Use case testing (chapter 9) read on your own
51 Testing foo: add one and divide by int foo(int j) { j = j-1; // Error, should be j+1 j = j/30000; return j; } 51 TDDD04 Software Testing
Equivalence Class Testing. Chapter 6
Equivalence Class Testing Chapter 6 Boundary value problems What problems does boundary value testing have? ECT 2 Boundary value problems 2 Generates test cases with Serious gaps Massive redundancy ECT
More informationProbability Exercises. Problem 1.
Probability Exercises. Ma 162 Spring 2010 Ma 162 Spring 2010 April 21, 2010 Problem 1. ˆ Conditional Probability: It is known that a student who does his online homework on a regular basis has a chance
More informationSoftware 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 informationComputers also need devices capable of Storing data and information Performing mathematical operations on such data
Sequential Machines Introduction Logic devices examined so far Combinational Output function of input only Output valid as long as input true Change input change output Computers also need devices capable
More information4.4 The Calendar program
4.4. THE CALENDAR PROGRAM 109 4.4 The Calendar program To illustrate the power of functions, in this section we will develop a useful program that allows the user to input a date or a month or a year.
More informationFIT100 Spring 01. Project 2. Astrological Toys
FIT100 Spring 01 Project 2 Astrological Toys In this project you will write a series of Windows applications that look up and display astrological signs and dates. The applications that will make up the
More informationDepartment of Electrical and Computer Engineering University of Wisconsin Madison. Fall Final Examination
Department of Electrical and Computer Engineering University of Wisconsin Madison ECE 553: Testing and Testable Design of Digital Systems Fall 2013-2014 Final Examination CLOSED BOOK Kewal K. Saluja Date:
More informationPath 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 informationPath 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 informationFrequently Asked Questions
Frequently Asked Questions Can I still get paid via direct deposit? Can I use e- wallet to pay for USANA auto ship orders? Can I use e- wallet to pay for USANA products? Can I use e- wallet to pay for
More informationChapter 10 Retrospective on Unit Testing
Chapter 10 Retrospective on Unit The Test Method Pendulum Code-based Spec-based Path Dataflow Slice Decision Table Boundary Equivalence Value Class Low Semantic Content High Semantic Content Low Semantic
More information5 ProbabilisticAnalysisandRandomized Algorithms
5 ProbabilisticAnalysisandRandomized Algorithms This chapter introduces probabilistic analysis and randomized algorithms. If you are unfamiliar with the basics of probability theory, you should read Appendix
More informationCSCI3390-Assignment 2 Solutions
CSCI3390-Assignment 2 Solutions due February 3, 2016 1 TMs for Deciding Languages Write the specification of a Turing machine recognizing one of the following three languages. Do one of these problems.
More informationDAILY QUESTIONS 28 TH JUNE 18 REASONING - CALENDAR
DAILY QUESTIONS 28 TH JUNE 18 REASONING - CALENDAR LEAP AND NON-LEAP YEAR *A non-leap year has 365 days whereas a leap year has 366 days. (as February has 29 days). *Every year which is divisible by 4
More informationIntroduction to Digital Logic
Introduction to Digital Logic Lecture 17: Latches Flip-Flops Problem w/ Bistables Output should have been at end of sequence Problem: Glitch was remembered Need some way to ignore inputs until they are
More informationEARTH S REVOLUTION -and- EARTH S ROTATION
EARTH S REVOLUTION -and- EARTH S ROTATION Earth s Revolution Have you ever noticed that your classroom globe is tilted? This is no accident. Globes are made to be replicas, or models, of the Earth. Earth
More informationAccountability. User Guide
Accountability User Guide The information in this document is subject to change without notice and does not represent a commitment on the part of Horizon. The software described in this document is furnished
More informationLet s now begin to formalize our analysis of sequential machines Powerful methods for designing machines for System control Pattern recognition Etc.
Finite State Machines Introduction Let s now begin to formalize our analysis of sequential machines Powerful methods for designing machines for System control Pattern recognition Etc. Such devices form
More information1 Introduction. 1.1 The Problem Domain. Self-Stablization UC Davis Earl Barr. Lecture 1 Introduction Winter 2007
Lecture 1 Introduction 1 Introduction 1.1 The Problem Domain Today, we are going to ask whether a system can recover from perturbation. Consider a children s top: If it is perfectly vertically, you can
More informationProcess Behavior Analysis Understanding Variation
Process Behavior Analysis Understanding Variation Steven J Mazzuca ASQ 2015-11-11 Why Process Behavior Analysis? Every day we waste valuable resources because we misunderstand or misinterpret what our
More informationIntroduction and basic definitions
Chapter 1 Introduction and basic definitions 1.1 Sample space, events, elementary probability Exercise 1.1 Prove that P( ) = 0. Solution of Exercise 1.1 : Events S (where S is the sample space) and are
More informationFibonacci Numbers. November 7, Fibonacci's Task: Figure out how many pairs of rabbits there will be at the end of one year, following rules.
Fibonacci Numbers November 7, 2010 Fibonacci's Task: Figure out how many pairs of rabbits there will be at the end of one year, following rules. Rules: 1. Start with a pair of new rabbits, born in December.
More informationMassachusetts Institute of Technology
.203J/6.28J/3.665J/5.073J/6.76J/ESD.26J Quiz Solutions (a)(i) Without loss of generality we can pin down X at any fixed point. X 2 is still uniformly distributed over the square. Assuming that the police
More informationA shape which can be divided by a straight line, so that each part is the mirror image of the other has reflective symmetry.
SYMMETRY There are two kinds of symmetry: a) reflective symmetry b) rotational symmetry a) Reflective Symmetry A shape which can be divided by a straight line, so that each part is the image of the other
More informationDistributed Systems Principles and Paradigms
Distributed Systems Principles and Paradigms Chapter 6 (version April 7, 28) Maarten van Steen Vrije Universiteit Amsterdam, Faculty of Science Dept. Mathematics and Computer Science Room R4.2. Tel: (2)
More informationChapter 1: Logic systems
Chapter 1: Logic systems 1: Logic gates Learning Objectives: At the end of this topic you should be able to: identify the symbols and truth tables for the following logic gates: NOT AND NAND OR NOR XOR
More information2nd Bay Area Mathematical Olympiad
2nd Bay Area Mathematical Olympiad February 29, 2000 The time limit for this exam is 4 hours. Your solutions should be clearly written arguments. Merely stating an answer without any justification will
More informationBusiness Statistics. Lecture 3: Random Variables and the Normal Distribution
Business Statistics Lecture 3: Random Variables and the Normal Distribution 1 Goals for this Lecture A little bit of probability Random variables The normal distribution 2 Probability vs. Statistics Probability:
More informationModule 9: Nonparametric Statistics Statistics (OA3102)
Module 9: Nonparametric Statistics Statistics (OA3102) Professor Ron Fricker Naval Postgraduate School Monterey, California Reading assignment: WM&S chapter 15.1-15.6 Revision: 3-12 1 Goals for this Lecture
More informationLecture 3: Latin Squares and Groups
Latin Squares Instructor: Padraic Bartlett Lecture 3: Latin Squares and Groups Week 2 Mathcamp 2012 In our last lecture, we came up with some fairly surprising connections between finite fields and Latin
More informationCentral Algorithmic Techniques. Iterative Algorithms
Central Algorithmic Techniques Iterative Algorithms Code Representation of an Algorithm class InsertionSortAlgorithm extends SortAlgorithm { void sort(int a[]) throws Exception { for (int i = 1; i < a.length;
More informationSTEP Support Programme. Hints and Partial Solutions for Assignment 17
STEP Support Programme Hints and Partial Solutions for Assignment 7 Warm-up You need to be quite careful with these proofs to ensure that you are not assuming something that should not be assumed. For
More informationIntroducing Proof 1. hsn.uk.net. Contents
Contents 1 1 Introduction 1 What is proof? 1 Statements, Definitions and Euler Diagrams 1 Statements 1 Definitions Our first proof Euler diagrams 4 3 Logical Connectives 5 Negation 6 Conjunction 7 Disjunction
More informationSTEP Support Programme. Hints and Partial Solutions for Assignment 4
STEP Support Programme Hints and Partial Solutions for Assignment 4 Warm-up 1 (i) This question was asking you to prove that the angle at the centre of a circle is twice the angle at the circumference.
More informationContemporary Logic Design, 2 nd Edition Errata as of 28 September 2005
Contemporary Logic Design, 2 nd Edition Errata as of 28 September 2005 Front Matter None reported so far. Chapter 1 Page 2: the 20mm measurement in Figure 1.1 is incorrect and should be corrected. Page
More informationGeorgia Tech High School Math Competition
Georgia Tech High School Math Competition Multiple Choice Test February 28, 2015 Each correct answer is worth one point; there is no deduction for incorrect answers. Make sure to enter your ID number on
More informationGraph Theory. Thomas Bloom. February 6, 2015
Graph Theory Thomas Bloom February 6, 2015 1 Lecture 1 Introduction A graph (for the purposes of these lectures) is a finite set of vertices, some of which are connected by a single edge. Most importantly,
More informationSTAT 516: Basic Probability and its Applications
Lecture 3: Conditional Probability and Independence Prof. Michael September 29, 2015 Motivating Example Experiment ξ consists of rolling a fair die twice; A = { the first roll is 6 } amd B = { the sum
More informationDigital Circuit Engineering
Digital Circuit Engineering 2nd Distributive ( + A)( + B) = + AB Circuits that work in a sequence of steps Absorption + A = + A A+= THESE CICUITS NEED STOAGE TO EMEMBE WHEE THEY AE STOAGE D MU G M MU S
More informationnumber. However, unlike , three of the digits of N are 3, 4 and 5, and N is a multiple of 6.
C1. The positive integer N has six digits in increasing order. For example, 124 689 is such a number. However, unlike 124 689, three of the digits of N are 3, 4 and 5, and N is a multiple of 6. How many
More informationMATH STUDENT BOOK. 12th Grade Unit 9
MATH STUDENT BOOK 12th Grade Unit 9 Unit 9 COUNTING PRINCIPLES MATH 1209 COUNTING PRINCIPLES INTRODUCTION 1. PROBABILITY DEFINITIONS, SAMPLE SPACES, AND PROBABILITY ADDITION OF PROBABILITIES 11 MULTIPLICATION
More informationCMM Uncertainty Budget
Table of Contents Purpose...3 Scope...3 Measurement Example...3 Uncertainty Groups...4 Probe Group...5 Calibration Artifact Group...6 Environment Group...7 CMM Group...8 Part Group...10 Conversion of Potential
More informationAbstractions and Decision Procedures for Effective Software Model Checking
Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture
More informationIntroduction to Probability. Ariel Yadin. Lecture 1. We begin with an example [this is known as Bertrand s paradox]. *** Nov.
Introduction to Probability Ariel Yadin Lecture 1 1. Example: Bertrand s Paradox We begin with an example [this is known as Bertrand s paradox]. *** Nov. 1 *** Question 1.1. Consider a circle of radius
More informationThe Cause-Effect Diagram can be used under these Circumstances:
What is Cause and Effect Graph Testing Technique - How to Design Test Cases With Example? Cause-Effect Graph graphically shows the connection between a given outcome and all issues that manipulate the
More informationTopic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number
Topic Contents Factoring Methods Unit 3 The smallest divisor of an integer The GCD of two numbers Generating prime numbers Computing prime factors of an integer Generating pseudo random numbers Raising
More informationMethods for Accelerating Conway's Doomsday Algorithm (part 1)
Methods for Accelerating Conway's Doomsday Algorithm (part 1) Chamberlain Fong [spectralfft@yahoo.com] 06/19/2010 Abstract We propose a modification of a key component in the Doomsday Algorithm for calculating
More informationProof assistants as a tool for thought
Proof assistants as a tool for thought Katherine Ye @hypotext Tools for thought workshop, March 16 circa 1700 Disputants unable to agree would not waste much time in futile argument... Leibniz (Harrison)
More informationProof Techniques (Review of Math 271)
Chapter 2 Proof Techniques (Review of Math 271) 2.1 Overview This chapter reviews proof techniques that were probably introduced in Math 271 and that may also have been used in a different way in Phil
More informationCONNECTING PAIRWISE AND POSITIONAL ELECTION OUTCOMES
CONNECTING PAIRWISE AND POSITIONAL ELECTION OUTCOMES DONALD G SAARI AND TOMAS J MCINTEE INSTITUTE FOR MATHEMATICAL BEHAVIORAL SCIENCE UNIVERSITY OF CALIFORNIA, IRVINE, CA 9697-5100 Abstract General conclusions
More informationMTH Linear Algebra. Study Guide. Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education
MTH 3 Linear Algebra Study Guide Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education June 3, ii Contents Table of Contents iii Matrix Algebra. Real Life
More informationQuadratic Equations Part I
Quadratic Equations Part I Before proceeding with this section we should note that the topic of solving quadratic equations will be covered in two sections. This is done for the benefit of those viewing
More informationFault Tolerant Computing CS 530 Software Reliability Growth. Yashwant K. Malaiya Colorado State University
Fault Tolerant Computing CS 530 Software Reliability Growth Yashwant K. Malaiya Colorado State University 1 Software Reliability Growth: Outline Testing approaches Operational Profile Software Reliability
More informationStatistical Process Control (SPC)
Statistical Process Control (SPC) Can Be Applied To Anything Measured Using Numbers Goal: To Make A Process Behave the Way We Want It to Behave Reality: It s impossible to control a process without tools.
More informationCh 7: Dummy (binary, indicator) variables
Ch 7: Dummy (binary, indicator) variables :Examples Dummy variable are used to indicate the presence or absence of a characteristic. For example, define female i 1 if obs i is female 0 otherwise or male
More informationStudent Book SERIES. Time and Money. Name
Student Book Name ontents Series Topic Time (pp. 24) l months of the year l calendars and dates l seasons l ordering events l duration and language of time l hours, minutes and seconds l o clock l half
More informationAUTUMN BREAK HOLIDAY HOME WORK CLASS XI BUSINESS STUDIES
BUSINESS STUDIES Do all the questions from NCERT of the following chapters in homework copy 1) Public, Private and Global enterprises 2) Business services 3) Emerging mode of business 4) Social responsibility
More informationGod doesn t play dice. - Albert Einstein
ECE 450 Lecture 1 God doesn t play dice. - Albert Einstein As far as the laws of mathematics refer to reality, they are not certain; as far as they are certain, they do not refer to reality. Lecture Overview
More informationLogical Time. 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation
Logical Time Nicola Dragoni Embedded Systems Engineering DTU Compute 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation 2013 ACM Turing Award:
More informationThe University of the State of New York REGENTS HIGH SCHOOL EXAMINATION THREE-YEAR SEQUENCE FOR HIGH SCHOOL MATHEMATICS COURSE II
The University of the State of New York REGENTS HIGH SCHOOL EXAMINATION THREE-YEAR SEQUENCE FOR HIGH SCHOOL MATHEMATICS COURSE II Wednesday, June 19, 00 1:15 to 4:15 p.m., only Notice... Scientific calculators
More information2011 Pearson Education, Inc
Statistics for Business and Economics Chapter 3 Probability Contents 1. Events, Sample Spaces, and Probability 2. Unions and Intersections 3. Complementary Events 4. The Additive Rule and Mutually Exclusive
More informationName Date. Parent comment: Triangles Levels 4-6 (15-20 mins)
Name Date Farsley Farfield Primary School Parent comment: Triangles Levels 4-6 (15-20 mins) Q1. Here are six triangles. One of them is an equilateral triangle. Put a tick ( ) in the equilateral triangle.
More informationModel Building: Selected Case Studies
Chapter 2 Model Building: Selected Case Studies The goal of Chapter 2 is to illustrate the basic process in a variety of selfcontained situations where the process of model building can be well illustrated
More informationShape Perimeter Area. + s 3. + s 2. side 3 (s 3 ) base (b) and side 1 (s 1
Geometric Formulas Reteaching 91 Math Course 1, Lesson 91 Shape Perimeter Area Square P = 4s A = s 2 Rectangle P = 2l + 2w A = lw Parallelogram P = 2b + 2s A = bh Triangle P = s 1 + s 2 + s 3 A = 1 2 bh
More informationHow to Make or Plot a Graph or Chart in Excel
This is a complete video tutorial on How to Make or Plot a Graph or Chart in Excel. To make complex chart like Gantt Chart, you have know the basic principles of making a chart. Though I have used Excel
More informationHomework (due Wed, Oct 27) Chapter 7: #17, 27, 28 Announcements: Midterm exams keys on web. (For a few hours the answer to MC#1 was incorrect on
Homework (due Wed, Oct 27) Chapter 7: #17, 27, 28 Announcements: Midterm exams keys on web. (For a few hours the answer to MC#1 was incorrect on Version A.) No grade disputes now. Will have a chance to
More informationElements of probability theory
The role of probability theory in statistics We collect data so as to provide evidentiary support for answers we give to our many questions about the world (and in our particular case, about the business
More informationRequirements Validation. Content. What the standards say (*) ?? Validation, Verification, Accreditation!! Correctness and completeness
Requirements Validation Requirements Management Requirements Validation?? Validation, Verification, Accreditation!! Check if evrything is OK With respect to what? Mesurement associated with requirements
More informationSearching Algorithms. CSE21 Winter 2017, Day 3 (B00), Day 2 (A00) January 13, 2017
Searching Algorithms CSE21 Winter 2017, Day 3 (B00), Day 2 (A00) January 13, 2017 Selection Sort (MinSort) Pseudocode Rosen page 203, exercises 41-42 procedure selection sort(a 1, a 2,..., a n : real numbers
More informationSTEP Support Programme. Hints and Partial Solutions for Assignment 5
STEP Support Programme Hints and Partial Solutions for Assignment 5 Warm-up 1 (i) As always, a diagram might be useful: cos θ b c and sin θ a c, so (using Pythagoras Theorem), cos 2 θ + sin 2 θ b2 + a
More informationMathematical Induction
Mathematical Induction MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 1 / 21 Outline 1 Mathematical Induction 2 Strong Mathematical
More informationUsing Isosceles and Equilateral Triangles
Geometry Unit 4: Intro to Triangles Name Day 2: Isosceles, Equilateral, and Sum of Triangles Notes Block Date Today, we will understand isosceles and equilateral triangles And you will be able to find
More informationData byte 0 Data byte 1 Data byte 2 Data byte 3 Data byte 4. 0xA Register Address MSB data byte Data byte Data byte LSB data byte
SFP200 CAN 2.0B Protocol Implementation Communications Features CAN 2.0b extended frame format 500 kbit/s Polling mechanism allows host to determine the rate of incoming data Registers The SFP200 provides
More informationMedium Term Plans for Mathematics (aligned with the 2014 National Curriculum) - Year Four (Spring Term)
Oral mental starters (ongoing, throughout the term): Count from ( back to) 0 in multiples of, 6, 4, 8, 7, 9,, 0, 100 Recall use multiplication division facts for the,, 4,, 6, 7, 8, 9, 10 times tables (up
More informationCS 6505, Complexity and Algorithms Week 7: NP Completeness
CS 6505, Complexity and Algorithms Week 7: NP Completeness Reductions We have seen some problems in P and NP, and we ve talked about space complexity. The Space Hierarchy Theorem showed us that there are
More informationDistributed Systems Principles and Paradigms. Chapter 06: Synchronization
Distributed Systems Principles and Paradigms Maarten van Steen VU Amsterdam, Dept. Computer Science Room R4.20, steen@cs.vu.nl Chapter 06: Synchronization Version: November 16, 2009 2 / 39 Contents Chapter
More informationLow-Degree Polynomial Roots
Low-Degree Polynomial Roots David Eberly, Geometric Tools, Redmond WA 98052 https://www.geometrictools.com/ This work is licensed under the Creative Commons Attribution 4.0 International License. To view
More informationYou have 3 hours to complete the exam. Some questions are harder than others, so don t spend too long on any one question.
Data 8 Fall 2017 Foundations of Data Science Final INSTRUCTIONS You have 3 hours to complete the exam. Some questions are harder than others, so don t spend too long on any one question. The exam is closed
More informationThe University of the State of New York REGENTS HIGH SCHOOL EXAMINATION THREE-YEAR SEQUENCE FOR HIGH SCHOOL MATHEMATICS COURSE II
The University of the State of New York REGENTS HIGH SCHOOL EXAMINATION THREE-YEAR SEQUENCE FOR HIGH SCHOOL MATHEMATICS COURSE II Tuesday, August 13, 2002 8:30 to 11:30 a.m., only Notice... Scientific
More informationNumber of People Contacted
Section 7.2 Problem Solving Using Exponential Functions (Exponential Growth and Decay) Key Words: exponential, growth, decay, critical mass Key Concepts: exponential growth, exponential decay, simple interest,
More information(b) [1] (c) [1]
GCSE MATHEMATICS Specimen Assessment Materials 29 1. Calculate the following. (a) 5 2 2 3 [2] (b) 0 3 0 6 (c) 8 7 5 25 (d) 7 1 8 4 [2] GCSE MATHEMATICS Specimen Assessment Materials 30 2. (a) Write down
More informationCMSC 451: Lecture 7 Greedy Algorithms for Scheduling Tuesday, Sep 19, 2017
CMSC CMSC : Lecture Greedy Algorithms for Scheduling Tuesday, Sep 9, 0 Reading: Sects.. and. of KT. (Not covered in DPV.) Interval Scheduling: We continue our discussion of greedy algorithms with a number
More information6. Finite State Machines
6. Finite State Machines 6.4x Computation Structures Part Digital Circuits Copyright 25 MIT EECS 6.4 Computation Structures L6: Finite State Machines, Slide # Our New Machine Clock State Registers k Current
More informationParity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process
Parity Checker Example A string of bits has even parity if the number of 1 s in the string is even. Design a circuit that accepts a bit-serial stream of bits and outputs a 0 if the parity thus far is even
More informationCSE332: Data Structures & Parallelism Lecture 2: Algorithm Analysis. Ruth Anderson Winter 2019
CSE332: Data Structures & Parallelism Lecture 2: Algorithm Analysis Ruth Anderson Winter 2019 Today Algorithm Analysis What do we care about? How to compare two algorithms Analyzing Code Asymptotic Analysis
More informationIntroduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras
Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Module - 03 Simplex Algorithm Lecture 15 Infeasibility In this class, we
More information8 Right Triangle Trigonometry
www.ck12.org CHAPTER 8 Right Triangle Trigonometry Chapter Outline 8.1 THE PYTHAGOREAN THEOREM 8.2 CONVERSE OF THE PYTHAGOREAN THEOREM 8.3 USING SIMILAR RIGHT TRIANGLES 8.4 SPECIAL RIGHT TRIANGLES 8.5
More information11 Heavy Hitters Streaming Majority
11 Heavy Hitters A core mining problem is to find items that occur more than one would expect. These may be called outliers, anomalies, or other terms. Statistical models can be layered on top of or underneath
More informationWAITING-TIME DISTRIBUTION FOR THE r th OCCURRENCE OF A COMPOUND PATTERN IN HIGHER-ORDER MARKOVIAN SEQUENCES
WAITING-TIME DISTRIBUTION FOR THE r th OCCURRENCE OF A COMPOUND PATTERN IN HIGHER-ORDER MARKOVIAN SEQUENCES Donald E. K. Martin 1 and John A. D. Aston 2 1 Mathematics Department, Howard University, Washington,
More informationDigital Circuit Engineering
Digital Circuit Engineering 2nd Distributive ( A)( B) = AB Circuits that work in a sequence of steps Absorption A = A A= THESE CICUITS NEED STOAGE TO EMEMBE WHEE THEY AE STOAGE D MU G M MU G S CLK D Flip
More informationCS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques
CS 30, Winter 2011 Morphology of Proof: An introduction to rigorous proof techniques 1 Methodology of Proof An example Deep down, all theorems are of the form If A then B, though they may be expressed
More informationSTA 431s17 Assignment Eight 1
STA 43s7 Assignment Eight The first three questions of this assignment are about how instrumental variables can help with measurement error and omitted variables at the same time; see Lecture slide set
More informationLatin squares: Equivalents and equivalence
Latin squares: Equivalents and equivalence 1 Introduction This essay describes some mathematical structures equivalent to Latin squares and some notions of equivalence of such structures. According to
More informationError Correcting Codes Prof. Dr. P. Vijay Kumar Department of Electrical Communication Engineering Indian Institute of Science, Bangalore
(Refer Slide Time: 00:15) Error Correcting Codes Prof. Dr. P. Vijay Kumar Department of Electrical Communication Engineering Indian Institute of Science, Bangalore Lecture No. # 03 Mathematical Preliminaries:
More informationChapter 5: Forecasting
1 Textbook: pp. 165-202 Chapter 5: Forecasting Every day, managers make decisions without knowing what will happen in the future 2 Learning Objectives After completing this chapter, students will be able
More informationUAB MATH TALENT SEARCH
NAME: GRADE: SCHOOL CODE: 2010-2011 UAB MATH TALENT SEARCH This is a two hour contest. Answers are to be written in the spaces provided on the test sheet. There will be no credit if the answer is incorrect.
More informationTESTING is one of the most important parts of the
IEEE TRANSACTIONS 1 Generating Complete Controllable Test Suites for Distributed Testing Robert M. Hierons, Senior Member, IEEE Abstract A test suite is m-complete for finite state machine (FSM) M if it
More informationSection 4.2 Basic Concepts of Probability
Section 4.2 Basic Concepts of Probability 2012 Pearson Education, Inc. All rights reserved. 1 of 88 Section 4.2 Objectives Identify the sample space of a probability experiment Identify simple events Use
More informationBasic Concepts of Probability. Section 3.1 Basic Concepts of Probability. Probability Experiments. Chapter 3 Probability
Chapter 3 Probability 3.1 Basic Concepts of Probability 3.2 Conditional Probability and the Multiplication Rule 3.3 The Addition Rule 3.4 Additional Topics in Probability and Counting Section 3.1 Basic
More informationMass Asset Additions. Overview. Effective mm/dd/yy Page 1 of 47 Rev 1. Copyright Oracle, All rights reserved.
Overview Effective mm/dd/yy Page 1 of 47 Rev 1 System References None Distribution Oracle Assets Job Title * Ownership The Job Title [list@yourcompany.com?subject=eduxxxxx] is responsible for ensuring
More information