Assignment 1

Assignment 1 - Science of Programming SPRING 2010 Question...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Science of Programming Assignment #1 SPRING 2010 Due date: Wednesday Jan. 19, Before noontime Question –1 Consider the game for “Innocent/Guilty” A student decided to speed up the play by modifying the rules. He suggests that for each round of the game a student would take out five coins and return back only one. The rules given were incomplete: 1.a Invent game rules for a game that begins with any number of coins. (10 points) { } { } 1.b Complete the input assertion and output assertion that will guarantee ONLY that the game will always terminate (does not matter if the student ends guilty or innocent). Add only assertions and invariants that can help you reason about termination. (10 points) 1.c Complete the input assertion and output assertion that will guarantee that the student always ends the game innocent. Add assertions and invariants that can help you reason about your claim. (10 points)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/04/2011 for the course CS 536 taught by Professor Cs536 during the Spring '08 term at Illinois Tech.

Page1 / 3

Assignment 1 - Science of Programming SPRING 2010 Question...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online