- Page 1 and 2: General Computer Science 320201 Gen
- Page 3 and 4: Contents Preface . . . . . . . . .
- Page 5 and 6: 0.2 Motivation and Introduction Pro
- Page 7 and 8: Problem 1.2 (Natural numbers) Prove
- Page 9 and 10: 1.1.2 Naive Set Theory Problem 1.4:
- Page 11 and 12: 1.1.3 Naive Set Theory Problem 1.7:
- Page 13 and 14: 1.2 Computing with Functions over I
- Page 15 and 16: Problem 1.11: Define functions to z
- Page 17 and 18: Problem 1.13 (Decompressing binary
- Page 19: Problem 1.15 (Translating between I
- Page 23 and 24: Problem 1.19 (List functions via fo
- Page 25 and 26: 1.2.2 Inductively Defined Sets and
- Page 27 and 28: Problem 1.23: In class, we have bee
- Page 29 and 30: Problem 1.25: Declare a data type m
- Page 31 and 32: Problem 1.27 (Your own lists) Defin
- Page 33 and 34: Problem 1.29 (Nary Multiplication)
- Page 35 and 36: Problem 1.31: Translate the given S
- Page 37 and 38: A First Abstract Interpreter Proble
- Page 39 and 40: Problem 1.35: Consider the followin
- Page 41 and 42: Definition 2 We call a substitution
- Page 43 and 44: fun substApply (subst_in,term_in) =
- Page 45 and 46: Problem 1.40: Explain the concept o
- Page 47 and 48: Problem 1.42: Give the recursion re
- Page 49 and 50: 1.2.6 Even more SML: Exceptions and
- Page 51 and 52: Problem 1.45 (List Functions with E
- Page 53 and 54: Problem 1.47 (Simple SML data conve
- Page 55 and 56: if is_negative then whole_r - fract
- Page 57 and 58: Problem 1.50 (List evaluation) Writ
- Page 59 and 60: Problem 1.51 (String parsing) Write
- Page 61 and 62: Problem 1.52 (SML File IO) Write an
- Page 63 and 64: Problem 1.54: Translate the given S
- Page 65 and 66: 1.3.2 A First Abstract Interpreter
- Page 67 and 68: Problem 1.58: Consider the followin
- Page 69 and 70: Definition 4 We call a substitution
- Page 71 and 72:
fun substApply (subst_in,term_in) =
- Page 73 and 74:
1.3.5 Evaluation Order and Terminat
- Page 75 and 76:
Problem 1.65: Give the recursion re
- Page 77 and 78:
Problem 1.67 (Operations with Excep
- Page 79 and 80:
Problem 1.69 (Transformations with
- Page 81 and 82:
Problem 1.71 (Strings and numbers)
- Page 83 and 84:
Problem 1.72 (Recursive evaluation)
- Page 85 and 86:
val test7 = eql ( evaluate_list [va
- Page 87 and 88:
val test4 = eql (evaluate_str ["~1.
- Page 89 and 90:
1.5 Encoding Programs as Strings 1.
- Page 91 and 92:
Problem 1.78: Let A := {a, h, /, #,
- Page 93 and 94:
1.5.2 Elementary Codes Problem 1.80
- Page 95 and 96:
Problem 1.82: Let A := {a, b, c, d,
- Page 97 and 98:
Problem 1.84 (Morse Code again) Wit
- Page 99 and 100:
1.5.3 Character Codes in the Real W
- Page 101 and 102:
1.6 Boolean Algebra 1.6.1 Boolean E
- Page 103 and 104:
Problem 1.88 (Partial orders in a B
- Page 105 and 106:
Problem 1.90: Given the SML data ty
- Page 107 and 108:
val (p,s)=find_sign(lst,0,1) (* we
- Page 109 and 110:
Problem 1.93: Is the expression e :
- Page 111 and 112:
Problem 1.95 (Boolean Equivalence)
- Page 113 and 114:
Problem 1.97 (CNF and DNF) Write th
- Page 115 and 116:
Problem 1.99 (Relations among polyn
- Page 117 and 118:
Problem 1.101 (Upper and lower boun
- Page 119 and 120:
Problem 1.103 (Proof of Membership
- Page 121 and 122:
Problem 1.105: Use the algorithm of
- Page 123 and 124:
Problem 1.106 (Quine-McCluskey with
- Page 125 and 126:
1.6.5 A simpler Method for finding
- Page 127 and 128:
Problem 1.110 (CNF with Karnaugh-Ve
- Page 129 and 130:
Problem 1.112 (Don’t-Care Minimiz
- Page 131 and 132:
1.7.2 Logical Systems and Calculi P
- Page 133 and 134:
Problem 1.116 (Almost a Proof) Plea
- Page 135 and 136:
Problem 1.118 (Alternative Calculus
- Page 137 and 138:
Problem 1.120 (Hilbert Calculus) Pr
- Page 139 and 140:
1.7.4 The Calculus of Natural Deduc
- Page 141 and 142:
Problem 1.123: Prove the associativ
- Page 143 and 144:
Problem 1.125 (Refutation and model
- Page 145 and 146:
Problem 1.127 (A Nor Tableau Calcul
- Page 147 and 148:
Problem 1.129 (Automated Theorem Pr
- Page 149 and 150:
G 1.8.2 Resolution for Propositiona
- Page 151 and 152:
Problem 1.133 (Basics of Resolution
- Page 153 and 154:
Problem 1.135: Use the resolution m
- Page 155 and 156:
We note that for the formula in DNF
- Page 157 and 158:
Problem 2.2 (Node Connectivity Rela
- Page 159 and 160:
Problem 2.4: Draw examples of 1. a
- Page 161 and 162:
Problem 2.6 (Parse trees and isomor
- Page 163 and 164:
Problem 2.8 (Graph basics) For each
- Page 165 and 166:
Problem 2.10 (Graph representation
- Page 167 and 168:
Problem 2.12 (Undirected tree prope
- Page 169 and 170:
Problem 2.14 (Parse Tree) Given the
- Page 171 and 172:
2.1.2 Introduction to Combinatorial
- Page 173 and 174:
Problem 2.17 (Combinational Circuit
- Page 175 and 176:
Problem 2.19 (Is XOR universal?) Im
- Page 177 and 178:
2.1.3 Realizing Complex Gates Effic
- Page 179 and 180:
Problem 2.23 (Length of the inner p
- Page 181 and 182:
Realizing n-ary Gates No problems s
- Page 183 and 184:
Problem 2.26 (Mapping between Posit
- Page 185 and 186:
Problem 2.28 (Playing with bases) C
- Page 187 and 188:
Adders Problem 2.30 (Cost and depth
- Page 189 and 190:
Problem 2.32 (Carry Chain Adder and
- Page 191 and 192:
Problem 2.34 (2-Stage Adder) Design
- Page 193 and 194:
Problem 2.36 (Sign-and-Magnitude Ad
- Page 195 and 196:
Problem 2.38: Given the following i
- Page 197 and 198:
Problem 2.40 (2s Complement Convers
- Page 199 and 200:
Problem 2.42: Compute the intermedi
- Page 201 and 202:
Problem 2.44 (Carry Chain Adder and
- Page 203 and 204:
Problem 2.46 (Reading from and writ
- Page 205 and 206:
Problem 2.47 (Event Detection with
- Page 207 and 208:
Problem 2.49 (Displaying a two-bit
- Page 209 and 210:
Problem 2.50 (Making a speedometer)
- Page 211 and 212:
Problem 2.52 (Multiplication) Write
- Page 213 and 214:
Problem 2.54 (Simulating a Register
- Page 215 and 216:
Problem 2.55 (sorting-by-selection)
- Page 217 and 218:
2.4.2 A Stack-based Virtual Machine
- Page 219 and 220:
Problem 2.59 (Fibonacci Numbers) As
- Page 221 and 222:
Problem 2.61 (Static procedure for
- Page 223 and 224:
Problem 2.63 (Simple While program
- Page 225 and 226:
Problem 2.65 (Duplicate identifiers
- Page 227 and 228:
App("IsPrime", [Con 119]) ); Anothe
- Page 229 and 230:
Problem 2.68 (Turing Machine) Given
- Page 231 and 232:
Problem 2.70 (Boolean Equivalence)
- Page 233 and 234:
Problem 2.71 (Halting Reductions) T
- Page 235 and 236:
Problem 2.73 (TM and languages) Des
- Page 237 and 238:
Problem 2.74 (TM and TCN numbers) G
- Page 239 and 240:
2.5 The Information and Software Ar
- Page 241 and 242:
10. 11. 12. 13. 14. 15. 16.
- Page 243 and 244:
Problem 2.79 (Web browsers) • Wha
- Page 245 and 246:
You are not required to handle link
- Page 247 and 248:
2.5.6 Security by Encryption Nothin
- Page 249 and 250:
Problem 3.2 (Define Problem Formula
- Page 251 and 252:
Problem 3.4 (Problem formulation) Y
- Page 253 and 254:
Problem 3.6 (Search of the max elem
- Page 255 and 256:
Problem 3.8 (Moving a Knight) Consi
- Page 257 and 258:
8 EdN:8 Problem 3.10 (Sudoku) This
- Page 259 and 260:
Problem 3.12 (Actions with Negative
- Page 261 and 262:
Problem 3.14 (Implementing Search)
- Page 263 and 264:
9 EdN:9 Problem 3.15 (A Trip Throug
- Page 265 and 266:
Problem 3.17 (Search Strategy Compa
- Page 267 and 268:
Problem 3.19: Write the next functi
- Page 269 and 270:
Problem 3.20 (Interpreting Search R
- Page 271 and 272:
Problem 3.22 (Power Source Search)
- Page 273 and 274:
3.1.4 Informed Search Strategies Pr
- Page 275 and 276:
Problem 3.26 (A variant of A ∗ )
- Page 277 and 278:
Problem 3.28 (Sudoku Revisited) Rem
- Page 279 and 280:
Problem 3.30 (A Good Old Friend, th
- Page 281 and 282:
in end; tie(h1::t1, h2::t2) = (h1,h
- Page 283 and 284:
Problem 3.33 (Relations between sea
- Page 285 and 286:
3.1.5 Local Search Problem 3.35 (Lo
- Page 287 and 288:
Problem 3.37 (Local Beam Search) Wh
- Page 289 and 290:
Sample run: val matrix = [[(false,t
- Page 291 and 292:
val init4 = [(man 2,woman 1),(man 3
- Page 293 and 294:
Problem 3.40 (Implementing simulate
- Page 295 and 296:
Problem 3.41 (Simulated annealing s
- Page 297 and 298:
3.2 Logic Programming 3.2.1 Introdu