程序代写

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 »

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 »

CPSC 418 midterm take home

CpSc 418 Midterm – Take Home Part Due: February 23, 2023, 11:59pm 100 points Please submit your solution using: handin cs-418 midterm-home Your solution should contain two files: midterm.erl: Your solutions to coding questions. midterm.pdf: Your solutions to written questions. The instructors solution to homework 2 along with more test cases are available at: http://www.students.cs.ubc.ca/~cs-418/2022-2/exams/midterm-1/midterm.html.

CPSC 418 midterm take home Read More »

CPSC 418 hw1 Erlang

-module(hw1). % template code for CPSC 521 hw1. -export([sum/1, sum_i/0, sum_hr/1, sum_tr/1, sum_iii/1, % functions for Question 1 sq/1, sq_i/0, sq_ii/1, sq_iii/1]). -export([gcd/2]). % function for Question 2 -export([p/1, p/2, pi/1, pi/2]). % functions for Question 3. -export([gen_fold/3, gen_test/1]). % functions for Question 4. % -export([…]). % When writing your implementation, you will almost %

CPSC 418 hw1 Erlang Read More »

CPSC 418 hw2

CpSc 418 Homework 2 Due: February 7, 2023, 11:59pm Early-Bird: February 5, 2023, 11:59pm 105 points Please submit your solution using: handin cs-418 hw2 Your solution should contain three files: hw2.erl: Erlang source code for your solutions to the questions. hw2_tests.erl: EUnit tests for the functions you were asked to write. In addition to the

CPSC 418 hw2 Read More »

CPSC 418 hw2 Erlang

-module(hw2). % template code for CPSC 418, HW2. -export([p/2]). % function for Question 1 -export([reduce_bu/3]). % function for Question 2 -export([scan_bu/4]). % function for Question 2 % functions for Question 4 -export([brownie_steps/2, brownie_seq/2, brownie_max_mag/1, brownie_max_mag/2, brownie_par/3, brownie_stat/3, brownie_stat/4]). % a few utility functions -export([gcd/2, missing_implementation/1]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % template for Q1: use reduce to

CPSC 418 hw2 Erlang Read More »