AMS303 ChapT10

Progressively finite games (directed graphs): i) a finite number of choices at each move; and ii) the play of game ends after a finite number of moves (unlike, say, chess) Winner of the game is the player who makes the last move (to a winning position)—ending the game. Example 1: Can take away 1,2,3,or 4 […]

AMS303 ChapT10 Read More »

AMS303 Chap9

Chapter 9 – Polya’s Enumeration Formula For black-white colorings of the corners of a floating square, the pattern inventory is 1b4+ 1b3w+ 2b2w2+ 1bw3+ 1w4 There are six non-equivalent colorings. The symmetries are a closed system. These eight symmetries generalize to any even n-gon. Colorings C and C’ are equivalent, C ≈ C’, if there

AMS303 Chap9 Read More »

CSC148 Assignment 1

Task 1: Reading and recording call events You are now ready to begin writing code! A note about doctests: we’ve omitted doctests from most of the starter code, and you aren’t required to write doctests for this assignment. You will write your tests in pytest instead. This is because, in this assignment, initializing objects for testing

CSC148 Assignment 1 Read More »

C88C hw05

# Diner ADT def make_diner(name): “”” Diners are represented by their name and the number of free tables they have.””” return [name, 0] def num_free_tables(diner): return diner[1] def name(diner): return diner[0] # You will implement add_table and serve which are part of the Diner ADT # Group ADT def make_group(name): “”” Groups are represented by

C88C hw05 Read More »

CS 61A hw04

passphrase = ‘*** PASSPHRASE HERE ***’ def midsem_survey(p): You do not need to understand this code. >>> midsem_survey(passphrase) ‘3d9f1125b109b311959d068240016badb874603eab75302a445e1a50’ import hashlib return hashlib.sha224(p.encode(‘utf-8’)).hexdigest() HW_SOURCE_FILE = __file__ def mobile(left, right): “””Construct a mobile from a left arm and a right arm.””” assert is_arm(left), “left must be a arm” assert is_arm(right), “right must be a arm” return

CS 61A hw04 Read More »