Review. Lecture 39. Robb T. Koether. Mon, Dec 5, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, / 14

Similar documents
Street-Routing Problems

Minimal Spanning Trees

The Traveling Salesman Problem Brute Force Method

The Pairwise-Comparison Method

Rotations and Translations

Scheduling and Digraphs

Solving Recursive Sequences by Iteration

Sampling Distribution Examples Sections 15.4, 15.5

The Plurality-with-Elimination Method

The Critical-Path Algorithm

Recursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 26, 2014

The Traveling Salesman Problem Nearest-Neighbor Algorithm

Boxplots. Lecture 17 Section Robb T. Koether. Hampden-Sydney College. Wed, Feb 10, 2010

Scope and Parameter Passing

Stack Applications. Lecture 25 Sections Robb T. Koether. Hampden-Sydney College. Mon, Mar 30, 2015

Recursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 27, 2013

Displaying Distributions - Quantitative Variables

The Decreasing-Time Algorithm

Scope and Parameter Passing

Recursive Descent Parsers

Integer Overflow. Lecture 8 Section 2.5. Robb T. Koether. Hampden-Sydney College. Mon, Jan 27, 2014

Magnification and Minification

while Loops Lecture 13 Sections Robb T. Koether Wed, Sep 26, 2018 Hampden-Sydney College

Total Orders. Lecture 41 Section 8.5. Robb T. Koether. Hampden-Sydney College. Mon, Apr 8, 2013

Function Usage. Lecture 15 Sections 6.3, 6.4. Robb T. Koether. Hampden-Sydney College. Mon, Oct 1, 2018

Stack Applications. Lecture 27 Sections Robb T. Koether. Hampden-Sydney College. Wed, Mar 29, 2017

Programming Languages

LR Parsing - Conflicts

Recursion. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 17, 2018

Boolean Expressions. Lecture 31 Sections 6.6, 6.7. Robb T. Koether. Hampden-Sydney College. Wed, Apr 8, 2015

The x86 Instruction Set

Nondeterministic Programming in C++

Recognition of Tokens

Recursion. Lecture 26 Sections , Robb T. Koether. Hampden-Sydney College. Mon, Apr 6, 2015

The Class Construct Part 1

Webpage Navigation. Lecture 27. Robb T. Koether. Hampden-Sydney College. Mon, Apr 2, 2018

Ambient and Diffuse Light

XPath. Lecture 36. Robb T. Koether. Wed, Apr 16, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XPath Wed, Apr 16, / 28

The Coefficient of Determination

Shading Triangles. Lecture 37. Robb T. Koether. Hampden-Sydney College. Mon, Nov 30, 2015

Friends and Unary Operators

Density Curves Sections

Pointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Mon, Jan 20, 2014

Binary Tree Applications

Mipmaps. Lecture 35. Robb T. Koether. Hampden-Sydney College. Wed, Nov 18, 2015

The CYK Parsing Algorithm

Math 130 Final Exam Study Guide. 1. Voting

XPath Lecture 34. Robb T. Koether. Hampden-Sydney College. Wed, Apr 11, 2012

Implementing Linked Lists

Linked Lists. Lecture 16 Sections Robb T. Koether. Hampden-Sydney College. Wed, Feb 22, 2017

Fundamental Data Types

Programming Languages

Building the Abstract Syntax Trees

Regular Expressions. Lecture 10 Sections Robb T. Koether. Hampden-Sydney College. Wed, Sep 14, 2016

Basic PHP. Lecture 19. Robb T. Koether. Hampden-Sydney College. Mon, Feb 26, 2108

Abstract Data Types. Lecture 23 Section 7.1. Robb T. Koether. Hampden-Sydney College. Wed, Oct 24, 2012

Recursive Linked Lists

Operators. Lecture 12 Section Robb T. Koether. Hampden-Sydney College. Fri, Feb 9, 2018

The Graphics Pipeline

List Iterator Implementation

The Graphics Pipeline

The Class Construct Part 2

The string Class. Lecture 21 Sections 2.9, 3.9, Robb T. Koether. Wed, Oct 17, Hampden-Sydney College

MySQL Creating a Database Lecture 3

DTDs and XML Attributes

The Projection Matrix

JFlex. Lecture 16 Section 3.5, JFlex Manual. Robb T. Koether. Hampden-Sydney College. Mon, Feb 23, 2015

PHP Arrays. Lecture 18. Robb T. Koether. Hampden-Sydney College. Mon, Mar 4, 2013

The Projection Matrix

Pointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Fri, Jan 18, 2013

XML Attributes. Lecture 33. Robb T. Koether. Hampden-Sydney College. Wed, Apr 25, 2018

Basic PHP Lecture 17

Pointers. Lecture 1 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 14, 2015

Binary Tree Implementation

Junior Circle Meeting 3 Circuits and Paths. April 18, 2010

XQuery FLOWR Expressions Lecture 35

Binary Tree Implementation

Introduction to Compiler Design

Inheritance: The Fundamental Functions

The Traveling Salesman Problem Cheapest-Link Algorithm

Function Definition Syntax Tree

Aggregation. Lecture 7 Section Robb T. Koether. Hampden-Sydney College. Wed, Jan 29, 2014

Array Lists. Lecture 15. Robb T. Koether. Hampden-Sydney College. Mon, Feb 22, 2016

Specular Reflection. Lecture 19. Robb T. Koether. Hampden-Sydney College. Wed, Oct 4, 2017

The Model Stack. Lecture 8. Robb T. Koether. Hampden-Sydney College. Wed, Sep 6, 2017

Functional Dependencies and Normal Forms

Functional Dependencies and Normal Forms

PHP Queries and HTML Forms Lecture 23

Introduction to Databases

LR Parsing - The Items

The Mesh Class. Lecture 26. Robb T. Koether. Wed, Oct 28, Hampden-Sydney College

The Normal Distribution

AQR UNIT 7. Circuits, Paths, and Graph Structures. Packet #

H 4. Is the graph connected? A. Yes B. No C. Cannot be determined. 5. How many edges are on the graph? A. 8 B. 9 C. 10 D. 11 E.

Pointer Arithmetic. Lecture 4 Chapter 10. Robb T. Koether. Hampden-Sydney College. Wed, Jan 25, 2017

Section Graphs, Paths, and Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

Form Validation. Lecture 25. Robb T. Koether. Hampden-Sydney College. Wed, Mar 23, 2018

The counting numbers or natural numbers are the same as the whole numbers, except they do not include zero.,

JFlex Regular Expressions

Stacks and their Applications

Transcription:

Review Lecture 39 Robb T. Koether Hampden-Sydney College Mon, Dec 5, 2016 Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 1 / 14

1 The Exam Test #2 Test #3 Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 2 / 14

Outline 1 The Exam Test #2 Test #3 Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 3 / 14

The Exam The exam will be held Tuesday, December 13, 9:00 am - 12:00 pm, in this room. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 4 / 14

The Exam The exam will be held Tuesday, December 13, 9:00 am - 12:00 pm, in this room. Be present and prepared. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 4 / 14

The Exam Most of the exam questions will be standard problems, with very simple numbers. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 5 / 14

The Exam Most of the exam questions will be standard problems, with very simple numbers. The emphasis is on the algorithm, not the answer. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 5 / 14

The Exam Most of the exam questions will be standard problems, with very simple numbers. The emphasis is on the algorithm, not the answer. Be sure that you work is clear enough that I can confirm that you followed the correct algorithm. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 5 / 14

The Exam Most of the exam questions will be standard problems, with very simple numbers. The emphasis is on the algorithm, not the answer. Be sure that you work is clear enough that I can confirm that you followed the correct algorithm. Some of the problems will be modeled after those test questions (1) Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 5 / 14

The Exam Most of the exam questions will be standard problems, with very simple numbers. The emphasis is on the algorithm, not the answer. Be sure that you work is clear enough that I can confirm that you followed the correct algorithm. Some of the problems will be modeled after those test questions (1) that were important, and (2) Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 5 / 14

The Exam Most of the exam questions will be standard problems, with very simple numbers. The emphasis is on the algorithm, not the answer. Be sure that you work is clear enough that I can confirm that you followed the correct algorithm. Some of the problems will be modeled after those test questions (1) that were important, and (2) on which the class had trouble. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 5 / 14

The Exam Most of the exam questions will be standard problems, with very simple numbers. The emphasis is on the algorithm, not the answer. Be sure that you work is clear enough that I can confirm that you followed the correct algorithm. Some of the problems will be modeled after those test questions (1) that were important, and (2) on which the class had trouble. I want to see who went back and learned the material. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 5 / 14

Outline 1 The Exam Test #2 Test #3 Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 6 / 14

The Exam Test #2 Test #2, # 3:] (60%) Find the Banzhaf power distribution of the weighted voting system [6 : 6, 3, 3, 2]. Show clearly all of your work. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 7 / 14

The Exam Test #2 Test #2, #5b: (65%) Roy and Troy will divide divide three cases of beer, Budweiser, Coors, and Michelob, between themselves. Their value systems are as follows: Budweiser Coors Michelob Roy 16 12 20 Troy 12 12 18 (a) (4 pts) What is each player s fair share? (b) (8 pts) Let Roy be the divider and apply the divider-chooser method. Describe precisely the shares that each player receives. State exactly what fraction or percent of the assets each player receives. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 8 / 14

The Exam Test #2 Test #2, #6ab: (64%) Gary, Harry, and Larry will divide four pies, Apple, Blueberry, Cherry, and Lemon, among themselves. Their value systems are as follows: Apple Blueberry Cherry Lemon Gary 4 10 2 8 Harry 1 6 6 5 Larry 4 3 8 6 We will use the lone-chooser method to divide the pies. In the first stage, Gary and Harry will divide the pies between the two of them, with Gary dividing and Harry choosing. (a) (8 pts) Describe precisely the shares s 1 and s 2 into which Gary divides the pies. (b) (2 pts) Which share does Larry choose? In the second stage, they will divide their shares into subshares. (a) (8 pts) Describe precisely the subshares into which Gary and Harry divide their shares. (b) (2 pts) Which subshares does Larry choose? Be very specific. (c) (4 pts) Summarize the division by summarizing precisely what each Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 9 / 14

The Exam Test #2 Test #2, #6cde: (59%) Gary, Harry, and Larry will divide four pies, Apple, Blueberry, Cherry, and Lemon, among themselves. Their value systems are as follows: Apple Blueberry Cherry Lemon Gary 4 10 2 8 Harry 1 6 6 5 Larry 4 3 8 6 We will use the lone-chooser method to divide the pies. In the first stage, Gary and Harry will divide the pies between the two of them, with Gary dividing and Harry choosing. (a) (8 pts) Describe precisely the shares s 1 and s 2 into which Gary divides the pies. (b) (2 pts) Which share does Larry choose? In the second stage, they will divide their shares into subshares. (a) (8 pts) Describe precisely the subshares into which Gary and Harry divide their shares. (b) (2 pts) Which subshares does Larry choose? Be very specific. (c) (4 pts) Summarize the division by summarizing precisely what each Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 10 / 14

Outline 1 The Exam Test #2 Test #3 Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 11 / 14

The Exam Test #2 Test #2, # 7de: (59%) Arnie, Bernie, and Charlie are to divide three extremely rare coins among themselves. The coins are a 1909-S Lincoln cent, an 1885 Indian Head cent, and a 1902 Morgan dollar. Lincoln Indian Morgan Cent Head Cent Dollar Arnie $3000 $1500 $1200 Bernie $3200 $1200 $1150 Charlie $2500 $1350 $1400 We will use the method of sealed bids. (a) (4 pts) Find each player s fair share. (b) (4 pts) Tell who wins the various assets as a result of the bidding. (c) (8 pts) Describe precisely the first settlement, including how much cash each player paid or received. (d) (4 pts) What is the value of the surplus? (e) (4 pts) Summarize clearly and concisely the final settlement. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 12 / 14

The Exam Test #3 Test #3, #4: (69%) Consider the graph shown below. Decide which of the following is appropriate, and then do it. (The edges are dotted so that you can tell which ones you have traced over.) (i) If there exists an Euler circuit for the graph, then draw it, labeling the edges 1, 2, 3,... in order or list the vertices in the order visited. (ii) If there does not exist an Euler circuit, but there does exist an Euler path, then draw it, labeling the edges 1, 2, 3,... in order or list the vertices in the order visited. (iii) If there exists neither an Euler circuit nor an Euler path, then explain why. A D G J B E H K C F I L Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 13 / 14

The Exam Test #3 Test #3, #5: (69%) Find an optimal eulerization for the following graph. The vertices represent street intersections and the squares represent city blocks, so you cannot draw diagonal edges; any new edges must represent retraveling an existing edge. In other words, if this were an instance of the Security Guard Problem, find a circuit with the fewest number of streets that the guard would have to walk twice to traverse all the streets at least once. Robb T. Koether (Hampden-Sydney College) Review Mon, Dec 5, 2016 14 / 14