Poster ID 19 Binomial vs. Hypergeometric Yvanny Chang What s the difference?

Size: px
Start display at page:

Download "Poster ID 19 Binomial vs. Hypergeometric Yvanny Chang What s the difference?"

Transcription

1 Poster ID 19 Binomial vs. Hypergeometric Yvanny Chang What s the difference? 1

2 Project Introduction In Statistics, Binomial is replacement and Hypergeometric is no replacement. Can we find examples of them in everyday life? Can we use a Java program to show the difference? Y E S 2

3 Case Study: Powerball Lotto Jan created largest Jackpot in U.S. history of $1.5 billion. Hypergeometric (No replacement) 5 White Balls Binomial (Replacement) 1 Red Ball (can be the same number as the 5 White Balls) Question: what if red ball has no duplicate? (Hypergeometric; No Replacement) 3

4 Rule of Red Ball 47 White Balls (No replacement, or no duplicates) Red Balls (Replacement (duplicates allowed)) What do you think the probability difference between binomial and hypergeometric is? 4

5 Hand Calculation Mega number replacement Mega number without replacement 1.12X difference 5

6 General Java Model For X number of white balls, Y number of red balls, what is winning chance for the following cases? 5+1: Match 5 white balls and 1 red ball 5+0: Match 5 white balls and no red ball Y=X 4+1: Match 4 white balls and 1 red ball 4+0: Match 4 white balls and no red ball Y=X-5 6

7 Java Flowchart Develop a Java program to calculate the probabilities for different X, Y and matching scenarios. This is the Java Flowchart: X Y More scenarios and variables can be simulated in Java without much modification. 7

8 Create Java Script public static double FiveAndOne(int X, int Y){ // Match return combination(x,5)*y; } public static double FourAndZero(int X, int Y){ // Match return combination(x,5)*y/combination(5,4)/combination(x-5,1)/combination(y-1,1); } public static void main{ // Main program to print out the result int X=59, Y=59; System.out.println("5 + 1 X="+X+" Y="+Y+": Binomial is " + FiveAndOne(X,Y)); System.out.println("5 + 1 X="+X+" Y="+Y+": Hypergeometric is " +FiveAndOne(X,Y-5)); System.out.println("5 + 1 X="+X+" Y="+Y+": Ratio is " +FiveAndOne(X,Y)/FiveAndOne(X,Y-5)); } 8

9 Matching Jackpot 5+1 Probability For the scenario of Matching 5 in X number of white balls, 1 in Y number of Red balls. The total space= C (X, 5) * C (Y, 1) The probability of matching 5 White Balls = C (5,5)= 1 The probability of matching Red Ball= C (1, 1)= 1 The total probability of 5+1 is 1 in C (X, 5) * C (Y, 1) C (5, 5) C (1, 1) 9

10 Matching 4+0 Prize Probability For the scenario of Matching 4 in X number of white balls, 0 in Y number of Red balls. The total space= C(X,5)*C(Y,1) The probability of matching 5 White Balls = C(5, 4) * C(X-5,1) The probability of matching Red Ball= C (Y-1, 1) The total probability of 4+0 is 1 in C(X,5)*Y/(C(5,4)*C(Y-5,1))/(Y-1) C (5, 4)* C(X-5,1) C (Y-1, 1) 10

11 Duplicate Powerball probability by JAVA = 292,201, = 11,688, = = = = = = JAVA match all numbers Reference from the Powerball Binomial (replacement) 11

12 Java Program Output Results 12

13 Odd Ratio of Binomial vs. Hypergeometric? With larger pool size, Hypergeometric will approach Binomial (Ratio => 1) Ratio of Matching Binomial Hypergeometric 9%-20% higher chance for Hypergeometric 13

14 Results and Conclusions This Java project shows the differences between Binomial (Replacement) and Hypergeometric (No replacement) in statistics and probability. Using Java program, we can easily test the probability for different scenarios and variables. The result matches with Powerball probability. Results also shows that Binomial is 9%-20% higher chance for Hypergeometric. With larger pool size, Hypergeometric will approach Binomial (Ratio => 1). 14

15 Future works Account for more than one Jackpot Winner. Current probability calculations only work if there is only one jackpot winner Calculate for other lotteries (Super Lotto ). See if other lotteries have different or similar results. 15

Game Guide. Keno Game Guide

Game Guide. Keno Game Guide Game Guide Keno Game Guide Contents Introduction and ways to play Keno - Keno Classic Keno Mega-Millions Keno Kwikpik Keno Heads or Tails Keno Advanced Keno Superplay Watching the game 0 Keno Replay 0

More information

Lotto Pro User's Manual

Lotto Pro User's Manual Lotto Pro User's Manual 2 Lotto Pro Help Table of Contents Foreword Part I Getting Started 0 5 1 Welcome... to Lotto Pro 5 2 System... Requirements 6 3 Installing... Lotto Pro 6 4 Starting... Lotto Pro

More information

Some announcements. Announcements for game due (via ) on Wednesday, March 15 Homework 6 due on March 15 Exam 3 on March 17

Some announcements. Announcements for game due (via  ) on Wednesday, March 15 Homework 6 due on March 15 Exam 3 on March 17 Hamming Codes Some announcements Announcements for game due (via email) on Wednesday, March 15 Homework 6 due on March 15 Exam 3 on March 17 Today s Goals Learn about error correcting codes and how they

More information

(a) This midterm exam is very easy! (b) In Java the return value of a method can be ignored.

(a) This midterm exam is very easy! (b) In Java the return value of a method can be ignored. ComS 207: Programming I Midterm 1, Tue. Sep 18, 2007 Student Name: Student ID Number: Recitation Section: 1. True/False Questions (10 x 1p each = 10p) (a) This midterm exam is very easy! (b) In Java the

More information

GT1200 RETAILER REFERENCE GUIDE

GT1200 RETAILER REFERENCE GUIDE GT1200 RETAILER REFERENCE GUIDE CONTACT INFORMATION RETAILER HOTLINE 1-800-242-7782 - REPORT LOST OR STOLEN TICKETS - TICKET ORDERING - APPLICATIONS AND CONTRACTS - ACCOUNTING QUESTIONS - GAME INFORMATION

More information

HyperGeometric Distribution

HyperGeometric Distribution HyperGeometric Distribution Young W. Lim 2018-02-22 Thr Young W. Lim HyperGeometric Distribution 2018-02-22 Thr 1 / 15 Outline 1 HyperGeometric Distribution Based on HyperGeometric Random Variables Cumulative

More information

D - Tic Tac Toe. Let's use our 9 sparkles to build a tic tac toe game! 2017 courses.techcamp.org.uk/ Page 1 of 9

D - Tic Tac Toe. Let's use our 9 sparkles to build a tic tac toe game! 2017 courses.techcamp.org.uk/ Page 1 of 9 D - Tic Tac Toe Let's use our 9 sparkles to build a tic tac toe game! 2017 courses.techcamp.org.uk/ Page 1 of 9 INTRODUCTION Let's use our 9 sparkles to build a tic tac toe game! Step 1 Assemble the Robot

More information

DAILY BONUS GAMES. $5K

DAILY BONUS GAMES. $5K Search win pch You can enter the PCH Sweepstakes by searching the internet using PCHSearch & Win as well as receive chances to win instantly every day! The first search of. How To Search. PCHSearch&Win

More information

Excel lottery number generator software

Excel lottery number generator software Home Excel lottery number generator software Compulotto The Lottery Analysis Pros. Compulotto is simply Vtrac City. Vtracs for breakfast, Lunch and Evening Drawings. Site is gone, archive copy only for

More information

Control Structures II. Repetition (Loops)

Control Structures II. Repetition (Loops) Control Structures II Repetition (Loops) Why Is Repetition Needed? How can you solve the following problem: What is the sum of all the numbers from 1 to 100 The answer will be 1 + 2 + 3 + 4 + 5 + 6 + +

More information

C212 Early Evaluation Exam Mon Feb Name: Please provide brief (common sense) justifications with your answers below.

C212 Early Evaluation Exam Mon Feb Name: Please provide brief (common sense) justifications with your answers below. C212 Early Evaluation Exam Mon Feb 10 2014 Name: Please provide brief (common sense) justifications with your answers below. 1. What is the type (and value) of this expression: 5 * (7 + 4 / 2) 2. What

More information

Intermediate Math Circles February 07, 2018 Contest Preparation I

Intermediate Math Circles February 07, 2018 Contest Preparation I Intermediate Math Circles February 07, 2018 Contest Preparation I WARM-UP: Hockey! Four teams A, B, C, and D competed against each other. Unlike the NHL, games in this league can end in a tie. The following

More information

Advantage Plus QUICK START GUIDE

Advantage Plus QUICK START GUIDE Advantage Plus QUICK START GUIDE INSTALLATION and SETUP 1. Install Advantage Plus on your computer. By default it should install to c:\gh folder. Here is a direct link to that file on our web site. You

More information

System. Entries. TATTS CARD THE SAFER WAY TO PLAY Apply or find out more at your nearest Tatts outlet, or visit tatts.com today.

System. Entries. TATTS CARD THE SAFER WAY TO PLAY Apply or find out more at your nearest Tatts outlet, or visit tatts.com today. PLEASE TAKE ONE HOW TO CHECK IF YOU VE WON > Watch draws on Channel 7TWO or view results on Channel 7 from 8.0pm AEST/8.00pm ACST (or.0pm for VIC and TAS during Daylight Saving) > Ask your retailer to

More information

Introduction to Computer Science Unit 3. Programs

Introduction to Computer Science Unit 3. Programs Introduction to Computer Science Unit 3. Programs This section must be updated to work with repl.it Programs 1 to 4 require you to use the mod, %, operator. 1. Let the user enter an integer. Your program

More information

OHIO Lottery Terminal Manual

OHIO Lottery Terminal Manual OHIO Lottery Terminal Manual October 2017 Intralot Inc. Lottery Terminal Manual October 2017 Page 1 Document Policy INTRALOT 2017. All rights reserved. All copyright, intellectual and industrial rights

More information

Top 5 Tips To Take A Stand Against Telephone Scams

Top 5 Tips To Take A Stand Against Telephone Scams Scammers often use the telephone as a method to gain personal details and con people out of their life savings. Avoid being one of them, protect yourself. Top 5 Tips To Take A Stand Against Telephone Scams

More information

Now that I ve apologized, I would like to respond to a few comments included in your October 6th letter.

Now that I ve apologized, I would like to respond to a few comments included in your October 6th letter. October 21, 2016 Mr. Gary Grief Ms Katelind Powers Texas Lottery Commission 611 E 6th Street Austin, Texas 78701 Dear Katelind & Gary, the LOTTO REPORT "Watchdogs of the Texas Lottery" Publisher Dawn Nettles

More information

2. Each element of an array is accessed by a number known as a(n) a. a. subscript b. size declarator c. address d. specifier

2. Each element of an array is accessed by a number known as a(n) a. a. subscript b. size declarator c. address d. specifier Lesson 4 Arrays and Lists Review CSC 123 Fall 2018 Answer Sheet Short Answers 1. In an array declaration, this indicates the number of elements that the array will have. b a. subscript b. size declarator

More information

APCS Semester #1 Final Exam Practice Problems

APCS Semester #1 Final Exam Practice Problems Name: Date: Per: AP Computer Science, Mr. Ferraro APCS Semester #1 Final Exam Practice Problems The problems here are to get you thinking about topics we ve visited thus far in preparation for the semester

More information

Binghamton University. CS-140 Fall Problem Solving. Creating a class from scratch

Binghamton University. CS-140 Fall Problem Solving. Creating a class from scratch Problem Solving Creating a class from scratch 1 Recipe for Writing a Class 1. Write the class boilerplate stuff 2. Declare Fields 3. Write Creator(s) 4. Write accessor methods 5. Write mutator methods

More information

INDEX. A SIMPLE JAVA PROGRAM Class Declaration The Main Line. The Line Contains Three Keywords The Output Line

INDEX. A SIMPLE JAVA PROGRAM Class Declaration The Main Line. The Line Contains Three Keywords The Output Line A SIMPLE JAVA PROGRAM Class Declaration The Main Line INDEX The Line Contains Three Keywords The Output Line COMMENTS Single Line Comment Multiline Comment Documentation Comment TYPE CASTING Implicit Type

More information

file:///d:/hg/trunk/build/webhelp/en/en/_single-index.htm

file:///d:/hg/trunk/build/webhelp/en/en/_single-index.htm 1. Introduction 2. Getting Started 1. First Steps 2. Lotteries 3. Glossary 4. Main Menu 5. Toolbars 6. Customizing Windows 7. Application Updates 8. Keyboard Shortcuts 9. Plugins 10. Upgrading from Expert

More information

LEC03: Decisions and Iterations

LEC03: Decisions and Iterations LEC03: Decisions and Iterations Q1. Identify and correct the errors in each of the following statements: a) if ( c < 7 ); System.out.println( "c is less than 7" ); b) if ( c => 7 ) System.out.println(

More information

Flowcharts [15 points]

Flowcharts [15 points] Flowcharts [15 points] Draw a flowchart that receives some positive integer numbers and calculates and prints how many odd and how many even numbers it has received. The program stops, when it receives

More information

Object-Oriented Programming

Object-Oriented Programming Object-Oriented Programming Java Syntax Program Structure Variables and basic data types. Industry standard naming conventions. Java syntax and coding conventions If Then Else Case statements Looping (for,

More information

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University 9/5/6 CS Introduction to Computing II Wayne Snyder Department Boston University Today: Arrays (D and D) Methods Program structure Fields vs local variables Next time: Program structure continued: Classes

More information

We have written lots of code so far It has all been inside of the main() method What about a big program? The main() method is going to get really

We have written lots of code so far It has all been inside of the main() method What about a big program? The main() method is going to get really Week 9: Methods 1 We have written lots of code so far It has all been inside of the main() method What about a big program? The main() method is going to get really long and hard to read Sometimes you

More information

Randomness tests for large samples of Keno Numbers

Randomness tests for large samples of Keno Numbers Bond University epublications@bond Information Technology papers Bond Business School February 2004 Randomness tests for large samples of Keno Numbers Stephen J. Sugden Bond University, ssugden@bond.edu.au

More information

A B C 1 Number of Squares Number of Nickels Total Number of Nickels =A2+1 =B2*2 =B3+C2

A B C 1 Number of Squares Number of Nickels Total Number of Nickels =A2+1 =B2*2 =B3+C2 6.7 Geometric Series The Canadian Open is an outdoor tennis tournament. The tournament started in 1881, and the men s and women s events alternate between Toronto and Montreal every other year. In the

More information

Pch 1 million dollar sweepstakes entry

Pch 1 million dollar sweepstakes entry Pch 1 million dollar sweepstakes entry I, Robbin Perry claim the $1,000,000.00 cash to win pch gwy. No. 8035. Yes, I m your winner. I take total claimed of my legacy. Search # 1 of 3. Publishers Clearing

More information

1. What does the following code fragment write to the monitor?

1. What does the following code fragment write to the monitor? 1. What does the following code fragment write to the monitor? int sum = 14; if ( sum < 20 ) System.out.print("Under "); else System.out.print("Over "); System.out.println("the limit."); a. Under b. Over

More information

Dynamic Programming. See p of the text

Dynamic Programming. See p of the text Dynamic Programming See p. 329-333 of the text Clicker Q: There are some situations in which recursion can be massively inefficient. For example, the standard Fibonacci recursion Fib(n) = Fib(n-1) + Fib(n-2)

More information

ELECTRONIC RAFFLE SYSTEMS MINIMUM TECHNICAL STANDARDS FOR MEGA RAFFLES

ELECTRONIC RAFFLE SYSTEMS MINIMUM TECHNICAL STANDARDS FOR MEGA RAFFLES ELECTRONIC RAFFLE SYSTEMS MINIMUM TECHNICAL STANDARDS FOR MEGA RAFFLES DRAFT - SEPTEMBER 2016 AGCO VISION A leader in the alcohol, gaming and horse racing sectors through effective regulation and services

More information

Ohad Barzilay and Oranit Dror

Ohad Barzilay and Oranit Dror The String Class Represents a character string (e.g. "Hi") Implicit constructor: String quote = "Hello World"; string literal All string literals are String instances Object has a tostring() method More

More information

Java GUI Test #1 Solutions 7/10/2015

Java GUI Test #1 Solutions 7/10/2015 SI@UCF Java GUI Test #1 Solutions 7/10/2015 1) (12 pts) Jimmy's box for crayons has dimensions L x W x H. Each crayon he puts in has a height of exactly H. Thus, he stands each crayon up in the box forming

More information

Lecture 9: Arrays. Building Java Programs: A Back to Basics Approach by Stuart Reges and Marty Stepp. Copyright (c) Pearson All rights reserved.

Lecture 9: Arrays. Building Java Programs: A Back to Basics Approach by Stuart Reges and Marty Stepp. Copyright (c) Pearson All rights reserved. Lecture 9: Arrays Building Java Programs: A Back to Basics Approach by Stuart Reges and Marty Stepp Copyright (c) Pearson 2013. All rights reserved. Can we solve this problem? Consider the following program

More information

Distinguish between a class and an object

Distinguish between a class and an object Java Revision Distinguish between a class and an object Distinguish between a class and an object A class is the blueprint from which individual objects are created; And object is an instance of a class.

More information

int a; int b = 3; for (a = 0; a < 8 b < 20; a++) {a = a + b; b = b + a;}

int a; int b = 3; for (a = 0; a < 8 b < 20; a++) {a = a + b; b = b + a;} 1. What does mystery(3) return? public int mystery (int n) { int m = 0; while (n > 1) {if (n % 2 == 0) n = n / 2; else n = 3 * n + 1; m = m + 1;} return m; } (a) 0 (b) 1 (c) 6 (d) (*) 7 (e) 8 2. What are

More information

LOTTERY ARV (MS Windows program)

LOTTERY ARV (MS Windows program) LOTTERY ARV (MS Windows program) Software product: Lottery ARV ver 1.3 Author: Igor Grgić Copyright (c) Igor Grgić. All rights reserved. www.arv-studio.com/lottery-arv Questions, suggestions, comments

More information

Java Assignment 3: Loop Practice Ver 3.0 Last Updated: 12/1/2015 8:57 AM

Java Assignment 3: Loop Practice Ver 3.0 Last Updated: 12/1/2015 8:57 AM Java Assignment 3: Loop Practice Ver 3.0 Last Updated: 12/1/2015 8:57 AM Let s get some practice creating programs that repeat commands inside of a loop in order to accomplish a particular task. You may

More information

Lotto007 XP Manual Getting Started Quick Start Welcome to Lotto007 XP Installing Lotto007 XP Starting Lotto007 XP System Requirements Working with

Lotto007 XP Manual Getting Started Quick Start Welcome to Lotto007 XP Installing Lotto007 XP Starting Lotto007 XP System Requirements Working with Lotto007 XP Manual Getting Started Quick Start Welcome to Lotto007 XP Installing Lotto007 XP Starting Lotto007 XP System Requirements Working with Lottery Drawing Files Opening a Lottery Deleting a Drawing

More information

Midterm CSE 21 Spring 2012

Midterm CSE 21 Spring 2012 Signature Name Student ID Midterm CSE 21 Spring 2012 Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 _ (20 points) _ (15 points) _ (13 points) _ (23 points) _ (10 points) _ (8 points) Total _ (89 points) (84

More information

Lottery Looper. User Manual

Lottery Looper. User Manual Lottery Looper User Manual Lottery Looper 2.2 copyright Timersoft. All rights reserved. http://www.timersoft.com The information contained in this document is subject to change without notice. This document

More information

Approved establishments, which must have a valid liquor license, will pay a $500 annual license fee to offer KENO 603, according to the legislation.

Approved establishments, which must have a valid liquor license, will pay a $500 annual license fee to offer KENO 603, according to the legislation. GOVERNOR Christopher T. Sununu CHAIRMAN Debra M. Douglas COMMISSIONER Paul J. Holloway COMMISSIONER David L. Gelinas EXECUTIVE DIRECTOR Charles R. McIntyre December 1, 201. KENO 0 IS ON SALE NOW! During

More information

All answers will be posted on web site, and most will be reviewed in class.

All answers will be posted on web site, and most will be reviewed in class. Lesson 4 Arrays and Lists Review CSC 123 Fall 2018 Notes: All homework must be submitted via e-mail. All parts of assignment must be submitted in a single e-mail with multiple attachments when required.

More information

CS/B.TECH/CSE(OLD)/SEM-6/CS-605/2012 OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

CS/B.TECH/CSE(OLD)/SEM-6/CS-605/2012 OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 CS/B.TECH/CSE(OLD)/SEM-6/CS-605/2012 2012 OBJECT ORIENTED PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give their answers

More information

TEXAS LOTTERY COMMISSION. Instant Ticket Game Closing Analysis SUMMARY REPORT. 28, 495, 300 Warehouse Packs 80, , 000, 000 Percent Sold 85.

TEXAS LOTTERY COMMISSION. Instant Ticket Game Closing Analysis SUMMARY REPORT. 28, 495, 300 Warehouse Packs 80, , 000, 000 Percent Sold 85. TEXAS LOTTERY COMMISSION Instant Ticket Game Closing Analysis SUMMARY REPORT Instant Ticket Information Date Completed 1/ 6/ 2015 Game # 1536 Confirmed Packs 1, 780 Game Name 1 OX Mega Mo:ne:A Active Packs1,293

More information

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS What is discrete? Sets (Rosen, Chapter 2) TOPICS Discrete math Set Definition Set Operations Tuples Consisting of distinct or unconnected elements, not continuous (calculus) Helps us in Computer Science

More information

The Math Class. Using various math class methods. Formatting the values.

The Math Class. Using various math class methods. Formatting the values. The Math Class Using various math class methods. Formatting the values. The Math class is used for mathematical operations; in our case some of its functions will be used. In order to use the Math class,

More information

mith College Computer Science CSC352 Week #6 Spring 2017 Dominique Thiébaut

mith College Computer Science CSC352 Week #6 Spring 2017 Dominique Thiébaut mith College Computer Science CSC352 Week #6 Spring 2017 Dominique Thiébaut dthiebaut@smith.edu Programming Lab Making the Game of Life Parallel https://www.youtube.com/watch?v=cgocezinq2i Serial Version

More information

New Concepts. Lab 7 Using Arrays, an Introduction

New Concepts. Lab 7 Using Arrays, an Introduction Lab 7 Using Arrays, an Introduction New Concepts Grading: This lab requires the use of the grading sheet for responses that must be checked by your instructor (marked as Question) AND the submission of

More information

COMP200 INTERFACES. OOP using Java, from slides by Shayan Javed

COMP200 INTERFACES. OOP using Java, from slides by Shayan Javed 1 1 COMP200 INTERFACES OOP using Java, from slides by Shayan Javed Interfaces 2 ANIMAL picture food sleep() roam() makenoise() eat() 3 ANIMAL picture food sleep() roam() makenoise() eat() 4 roam() FELINE

More information

Download the CoverMaster Zipped file into a temp directory or directory of your choice or create one, such as CM or CoverM or CoverMaster or CoverM51.

Download the CoverMaster Zipped file into a temp directory or directory of your choice or create one, such as CM or CoverM or CoverMaster or CoverM51. CoverMaster Tempory Doc. Download the CoverMaster Zipped file into a temp directory or directory of your choice or create one, such as CM or CoverM or CoverMaster or CoverM51. Use WinZip or EasyZip to

More information

COMP 250: Java Programming I. Carlos G. Oliver, Jérôme Waldispühl January 17-18, 2018 Slides adapted from M. Blanchette

COMP 250: Java Programming I. Carlos G. Oliver, Jérôme Waldispühl January 17-18, 2018 Slides adapted from M. Blanchette COMP 250: Java Programming I Carlos G. Oliver, Jérôme Waldispühl January 17-18, 2018 Slides adapted from M. Blanchette Variables and types [Downey Ch 2] Variable: temporary storage location in memory.

More information

The table shows how monthly electricity charges are calculated, for a given kwh consumption, using a REGULAR RESIDENTIAL rate plan.

The table shows how monthly electricity charges are calculated, for a given kwh consumption, using a REGULAR RESIDENTIAL rate plan. Activity 1 The table shows how monthly electricity charges are calculated, for a given kwh consumption, using a REGULAR RESIDENTIAL rate plan. You have to write a single method to compute the monthly charge,

More information

MagicBus Tours 25 Anniversary Contest 2018

MagicBus Tours 25 Anniversary Contest 2018 Contest duration: MagicBus Tours 25 Anniversary Contest 2018 3:00pm January 26, 2018 until 3:00pm on April 30, 2018. MagicBus Tours Ltd. reserves the right to terminate the contest or alter the rules of

More information

CS 231 Data Structures and Algorithms Fall Arrays Lecture 07 - September 19, Prof. Zadia Codabux

CS 231 Data Structures and Algorithms Fall Arrays Lecture 07 - September 19, Prof. Zadia Codabux CS 231 Data Structures and Algorithms Fall 2018 Arrays Lecture 07 - September 19, 2018 Prof. Zadia Codabux 1 Agenda Arrays For Each Loop 2D Arrays 2 Administrative None 3 Arrays 4 Array Data structure

More information

Trusted Audit. Trust in Process. Trust in Data. through. Irena Szrek, Director Szrek2Solutions. SMART TECH, April 18, 2007 Szrek2Solutions, LLC Page 1

Trusted Audit. Trust in Process. Trust in Data. through. Irena Szrek, Director Szrek2Solutions. SMART TECH, April 18, 2007 Szrek2Solutions, LLC Page 1 Trusted Audit Trust in Process through Trust in Data Irena Szrek, Director Szrek2Solutions SMART TECH, April 18, 2007 Szrek2Solutions, LLC Page 1 Szrek2Solutions, LLC International supplier of secure system

More information

ELECTRONIC RAFFLE SYSTEMS MINIMUM TECHNICAL STANDARDS

ELECTRONIC RAFFLE SYSTEMS MINIMUM TECHNICAL STANDARDS ELECTRONIC RAFFLE SYSTEMS MINIMUM TECHNICAL STANDARDS VERSION 1.0 NOVEMBER 2018 Alcohol and Gaming Commission of Ontario 90 SHEPPARD AVE E - SUITE 200 TORONTO ON M2N 0A4 Fax: 416 326-8711 Tel: 416 326-8700

More information

CS61B Lecture #2. Public Service Announcements:

CS61B Lecture #2. Public Service Announcements: CS61B Lecture #2 Please make sure you have obtained an account, run register, and finished the survey today. In the future (next week), the password required for surveys and such will be your account password

More information

Claremont McKenna College Computer Science

Claremont McKenna College Computer Science Claremont McKenna College Computer Science CS 51 Handout 4: Problem Set 4 February 10, 2011 This problem set is due 11:50pm on Wednesday, February 16. As usual, you may hand in yours until I make my solutions

More information

Multithreading in Java Part 2 Thread - States JAVA9S.com

Multithreading in Java Part 2 Thread - States JAVA9S.com Multithreading in Java Part 2 Thread - States By, Srinivas Reddy.S When start() method is invoked on thread It is said to be in Runnable state. But it is not actually executing the run method. It is ready

More information

CI228 CI228 Tutorials

CI228 CI228 Tutorials CI228 M A Smith University of Brighton September 13, 2016 Page 1 BIO - Basic Input Output Input of an integer number The static method BIO.getInt() will read from the keyboard an integer number typed by

More information

TEXAS LOTTPAX COMMISSION

TEXAS LOTTPAX COMMISSION TEXAS LOTTERY COMMISSION Instant Ticket Game Closing Analysis SUMMARY REPORT Instant Ticket Information Date Completed 2/ 9/ 2015 Game # 1580 Confirmed Packs 4, 170 Game Name 50X THE CASH Active Packs

More information

Anatomy of a static method, S&W, 2.1, figure page 188. Class.name or just name Scope, S&W, 2.1, figure page 189. Overloading

Anatomy of a static method, S&W, 2.1, figure page 188. Class.name or just name Scope, S&W, 2.1, figure page 189. Overloading Static Methods Anatomy of a static method, S&W, 2.1, figure page 188. Class.name or just name Scope, S&W, 2.1, figure page 189. Overloading public static int abs (final int x) { return x

More information

CS 3410 Ch 7 Recursion

CS 3410 Ch 7 Recursion CS 3410 Ch 7 Recursion Sections Pages 7.1-7.4, 7.7 93-319, 333-336 7.1 Introduction 1. A recursive method is a method that either directly or indirectly makes a call to itself. [Weiss]. It does this by

More information

CSC141, Computer Science I, Instructor: Dr. Zhen Jiang, Test 2

CSC141, Computer Science I, Instructor: Dr. Zhen Jiang, Test 2 CSC141, Computer Science I, Instructor: Dr. Zhen Jiang, Test 2 Name(print) Student Number Page Points Score 2 8 3 8 4 8 5 6 6 8 7 8 8 10 9 6 10 6 11 11 12 21 Total 100 1 Part 1 (56 pts): Select the correct

More information

St. Edmund Preparatory High School Brooklyn, NY

St. Edmund Preparatory High School Brooklyn, NY AP Computer Science Mr. A. Pinnavaia Summer Assignment St. Edmund Preparatory High School Name: I know it has been about 7 months since you last thought about programming. It s ok. I wouldn t want to think

More information

Adversary Arguments. A method for obtaining lower bounds

Adversary Arguments. A method for obtaining lower bounds Adversary Arguments A method for obtaining lower bounds What is an Adversary? A Second Algorithm Which Intercepts Access to Data Structures Constructs the input data only as needed Attempts to make original

More information

AP Computer Science A Unit 2. Exercises

AP Computer Science A Unit 2. Exercises AP Computer Science A Unit 2. Exercises A common standard is 24-bit color where 8 bits are used to represent the amount of red light, 8 bits for green light, and 8 bits for blue light. It is the combination

More information

Over and Over Again GEEN163

Over and Over Again GEEN163 Over and Over Again GEEN163 There is no harm in repeating a good thing. Plato Homework A programming assignment has been posted on Blackboard You have to convert three flowcharts into programs Upload the

More information

CISC 1600 Lecture 3.1 Introduction to Processing

CISC 1600 Lecture 3.1 Introduction to Processing CISC 1600 Lecture 3.1 Introduction to Processing Topics: Example sketches Drawing functions in Processing Colors in Processing General Processing syntax Processing is for sketching Designed to allow artists

More information

There are some situations in which recursion can be massively inefficient. For example, the standard Fibonacci recursion Fib(n) = Fib(n-1) + Fib(n-2)

There are some situations in which recursion can be massively inefficient. For example, the standard Fibonacci recursion Fib(n) = Fib(n-1) + Fib(n-2) Dynamic Programming There are some situations in which recursion can be massively inefficient. For example, the standard Fibonacci recursion Fib(n) = Fib(n-1) + Fib(n-2) computes the same values over and

More information

CS 101 Fall 2005 Midterm 2 Name: ID:

CS 101 Fall 2005 Midterm 2 Name:  ID: This exam is open text book but closed-notes, closed-calculator, closed-neighbor, etc. Questions are worth different amounts (in particular, the final two questions are worth substantially more than any

More information

CSE 201 JAVA PROGRAMMING I. Copyright 2016 by Smart Coding School

CSE 201 JAVA PROGRAMMING I. Copyright 2016 by Smart Coding School CSE 201 JAVA PROGRAMMING I Primitive Data Type Primitive Data Type 8-bit signed Two s complement Integer -128 ~ 127 Primitive Data Type 16-bit signed Two s complement Integer -32768 ~ 32767 Primitive Data

More information

Problem Grade Total

Problem Grade Total CS 101, Prof. Loftin: Final Exam, May 11, 2009 Name: All your work should be done on the pages provided. Scratch paper is available, but you should present everything which is to be graded on the pages

More information

2WB05 Simulation Lecture 1: Introduction and Monte Carlo simulation

2WB05 Simulation Lecture 1: Introduction and Monte Carlo simulation 2WB05 Simulation Lecture 1: Introduction and Monte Carlo simulation Marko Boon http://www.win.tue.nl/courses/2wb05 November 12, 2012 Organisation 2/39 studeerwijzer available (with notes, slides, programs,

More information

GRAPHING POLYNOMIALS DAY 2 U N I T 1 1

GRAPHING POLYNOMIALS DAY 2 U N I T 1 1 GRAPHING POLYNOMIALS DAY 2 U N I T 1 1 ODD/EVEN DEGREE POLYNOMIAL Odd degree polynomial: A polynomial whose largest power is an odd integer Even degree polynomial : A polynomial whose largest power is

More information

SIMULATION-BASED COMPARISON OF SCHEDULING TECHNIQUES IN MULTIPROGRAMMING OPERATING SYSTEMS ON SINGLE AND MULTI-CORE PROCESSORS *

SIMULATION-BASED COMPARISON OF SCHEDULING TECHNIQUES IN MULTIPROGRAMMING OPERATING SYSTEMS ON SINGLE AND MULTI-CORE PROCESSORS * SIMULATION-BASED COMPARISON OF SCHEDULING TECHNIQUES IN MULTIPROGRAMMING OPERATING SYSTEMS ON SINGLE AND MULTI-CORE PROCESSORS * Hala ElAarag, David Bauschlicher, and Steven Bauschlicher Department of

More information

Assignment #2: Simple Java Programs Due: 11AM PST on Monday, Jan 29 th

Assignment #2: Simple Java Programs Due: 11AM PST on Monday, Jan 29 th Chris Piech Handout #8 CS 106A Jan 19, 2018 Assignment #2: Simple Java Programs Due: 11AM PST on Monday, Jan 29 th This assignment should be done individually (not in pairs) Portions of this handouts by

More information

Tarsin Mobile Inc. 0

Tarsin Mobile Inc. 0 0 Tarsin Mobile Inc. Mobile gambling is legal in the UK 10 years experience in developing and marketing mobile games Over 2.5 million mobile players in UK alone Strong relationships with mobile network

More information

(l) Represent each of the sets A, B and C using bit strings. Then, use bit string representation and bitwise logical operations to find

(l) Represent each of the sets A, B and C using bit strings. Then, use bit string representation and bitwise logical operations to find Fall 2004 Ahmed Elgammal CS 205: Sample Final Exam December 6th, 2004 1. [10 points] Let A = {1, 3, 5, 7, 9}, B = {4, 5, 6, 7, 8}, C = {2, 4, 6, 8, 10}, D = {1, 2, 3} and let the universal set be U = {1,

More information

Find sweepstakes websites

Find sweepstakes websites Find sweepstakes websites Contest websites features contests from around the internet and cater also a popular destination for participants to find latest Sweepstakes, Giveaways, Instant. Sep 7, 2017.

More information

Flow of Control Branching 2. Cheng, Wei COMP May 19, Title

Flow of Control Branching 2. Cheng, Wei COMP May 19, Title Flow of Control Branching 2 Cheng, Wei COMP110-001 May 19, 2014 Title Review of Previous Lecture If else Q1: Write a small program that Reads an integer from user Prints Even if the integer is even Otherwise,

More information

The Daily Mail and Lotto 250k Giveaway promotion

The Daily Mail and Lotto 250k Giveaway promotion The Daily Mail and Lotto 250k Giveaway promotion INTRODUCTION 1. The following terms and conditions ( Terms ) relate to the Daily Mail s Lotto 250k Giveaway Guaranteed (the Promotion ). The Promotion gives

More information

Huawei Test 5. Explanation: P.W. of Rs. 12,880 due 8 months hence=rs. [ (12880*100)/(100+(18*(8/12)))]

Huawei Test 5. Explanation: P.W. of Rs. 12,880 due 8 months hence=rs. [ (12880*100)/(100+(18*(8/12)))] Huawei Test 5 1 A man wants to sell his scooter. There are two offers, one at Rs. 12,000 cash and the other a credit of Rs. 12,880 to be paid after 8 months, money being at 18% per annum. Which is the

More information

Lecture 5: Methods CS2301

Lecture 5: Methods CS2301 Lecture 5: Methods NADA ALZAHRANI CS2301 1 Opening Problem Find the sum of integers from 1 to 10, from 20 to 30, and from 35 to 45, respectively. 2 Solution public static int sum(int i1, int i2) { int

More information

Hashing 1. Searching Lists

Hashing 1. Searching Lists Hashing 1 Searching Lists There are many instanced when one is interested in storing and searching a list: phone company wants to provide caller ID: Given a phone number a name is returned. Somebody who

More information

Manual Entry Enter/Edit dates and draws in your database. Import.CSV Automatically import dates and draws into the currently open database.

Manual Entry Enter/Edit dates and draws in your database. Import.CSV Automatically import dates and draws into the currently open database. Cash 3 Lotto Cash3 Lotto is a storage, retrieval, report and analysis, and searchable database software program written specifically for Pick-3 lotteries. File Menu New Create a new database. Enter a name

More information

Chapter 11. Analysis of Algorithms

Chapter 11. Analysis of Algorithms Chapter 11 Analysis of Algorithms Chapter Scope Efficiency goals The concept of algorithm analysis Big-Oh notation The concept of asymptotic complexity Comparing various growth functions Java Foundations,

More information

Let s get started. Game guide

Let s get started. Game guide Let s get started Game guide What is Keno? Keno is a fun, easy game that is played every minutes. 0 numbers are drawn from the 0 available on the Keno game grid. Match the numbers you play to the numbers

More information

Building Java Programs

Building Java Programs Building Java Programs Chapter 5 Lecture 5-1: while Loops, Fencepost Loops, and Sentinel Loops reading: 4.1, 5.1 self-check: Ch. 4 #2; Ch. 5 # 1-10 exercises: Ch. 4 #2, 4, 5, 8; Ch. 5 # 1-2 Copyright 2009

More information

Material: Specification and Reasoning. Book: Logic in Computer Science, M.Huth, M.Ryan, Cambridge University Press. Lectures mondays here,

Material: Specification and Reasoning. Book: Logic in Computer Science, M.Huth, M.Ryan, Cambridge University Press. Lectures mondays here, Material: Specification and Reasoning Lectures mondays here, Lecturer Pasquale Malacaria CS/428 Labs thursdays with Dino DiStefano Book: Logic in Computer Science, M.Huth, M.Ryan, Cambridge University

More information

STATIC, ABSTRACT, AND INTERFACE

STATIC, ABSTRACT, AND INTERFACE STATIC, ABSTRACT, AND INTERFACE Thirapon Wongsaardsakul STATIC When variable is a static type, java allocates memory for it at loading time. Class loader Byte code verifier Static variable has been loaded

More information

1.00 Introduction to Computers and Engineering Problem Solving. Quiz 1 March 7, 2003

1.00 Introduction to Computers and Engineering Problem Solving. Quiz 1 March 7, 2003 1.00 Introduction to Computers and Engineering Problem Solving Quiz 1 March 7, 2003 Name: Email Address: TA: Section: You have 90 minutes to complete this exam. For coding questions, you do not need to

More information

Chapter 12: Arrays Think Java: How to Think Like a Computer Scientist by Allen B. Downey

Chapter 12: Arrays Think Java: How to Think Like a Computer Scientist by Allen B. Downey Chapter 12: Arrays Think Java: How to Think Like a Computer Scientist 5.1.2 by Allen B. Downey Current Options for Storing Data 1) You need to store the room temperature, such as 62.5, in a variable. What

More information

CMSC 150 INTRODUCTION TO COMPUTING LAB WEEK 3 STANDARD IO FORMATTING OUTPUT SCANNER REDIRECTING

CMSC 150 INTRODUCTION TO COMPUTING LAB WEEK 3 STANDARD IO FORMATTING OUTPUT SCANNER REDIRECTING CMSC 150 INTRODUCTION TO COMPUTING LAB WEEK 3 STANDARD IO FORMATTING OUTPUT SCANNER REDIRECTING INPUT AND OUTPUT Input devices Keyboard Mouse Hard drive Network Digital camera Microphone Output devices.

More information

Learning Recursion. Recursion [ Why is it important?] ~7 easy marks in Exam Paper. Step 1. Understand Code. Step 2. Understand Execution

Learning Recursion. Recursion [ Why is it important?] ~7 easy marks in Exam Paper. Step 1. Understand Code. Step 2. Understand Execution Recursion [ Why is it important?] ~7 easy marks in Exam Paper Seemingly Different Coding Approach In Fact: Strengthen Top-down Thinking Get Mature in - Setting parameters - Function calls - return + work

More information

Chapter 7 Control Statements Continued

Chapter 7 Control Statements Continued Chapter 7 Control Statements Continued Logical Operators used in Boolean expressions to control behavior of if, while or for statements. && - and, - or,! - not if (the sun shines && you have the time)

More information