*********
#!TRUE 

1 ==> (ladder-loop 1)
0: 1
1: 1.5
2: 1.6
3: 1.61538
4: 1.61764
5: 1.61797
6: 1.61802
7: 1.61803
8: 1.61803
9: 1.61803
10: 1.61803
11: 
Quit!

1 ==> (/ (+ 1 (sqrt 5)) 2)
1.61803 

1 ==> (tofu )
*******************

#!TRUE 

1 ==> ((resistance n2) (make-complex 0.99))
Wrong Number of Arguments 1
within procedure #[COMPOUND-PROCEDURE MAKE-COMPLEX]
There is no environment available;
using the current read-eval-print environment.

2 Error-> 
Quit!

1 ==> ((resistance n2) (make-complex 0 0.99))
(1.99677 . 8.02743e-2) 

1 ==> ((resistance n2) (make-complex 0 1))
(2 . 0) 

1 ==> ((resistance n2) (make-complex 0 1.01))
(1.99683 . -.079478) 

1 ==> ((resistance n2) (make-complex 0 .999))
(1.99996 . 8.00387e-3) 

1 ==> ((resistance n2) (make-complex 0 1.001))
(1.99996 . -7.99587e-3) 

1 ==> ((resistance n3) (make-complex 0 0.999))
(9.996 . .20002) 

1 ==> ((resistance n3) (make-complex 0 1))
(10. . 0) 

1 ==> ((resistance n3) (make-complex 0 1.001))
(9.996 . -.19982) 

1 ==> (tofu)

*******************
#!TRUE 

1 ==> sample-circuits
((PARALLEL-COMBINATION (PARALLEL-COMBINATION (RESISTOR (CAPACITANCE 2) #[COMPOUND-PROCEDURE 12348380]) (RESISTOR (INDUCTANCE 1) #[COMPOUND-PROCEDURE 12348916])) (PARALLEL-COMBINATION (SERIES-COMBINATION (RESISTOR (RESISTANCE 1) #[COMPOUND-PROCEDURE 12349376]) (RESISTOR (CAPACITANCE 1) #[COMPOUND-PROCEDURE 12347920])) (RESISTOR (RESISTANCE 2) #[COMPOUND-PROCEDURE 12349848]))) (SERIES-COMBINATION (SERIES-COMBINATION (RESISTOR (RESISTANCE 1) #[COMPOUND-PROCEDURE 12349376]) (RESISTOR (INDUCTANCE 1) #[COMPOUND-PROCEDURE 12348916])) (PARALLEL-COMBINATION (RESISTOR (CAPACITANCE 1) #[COMPOUND-PROCEDURE 12347920]) (SERIES-COMBINATION (RESISTOR (CAPACITANCE 2) #[COMPOUND-PROCEDURE 12348380]) (RESISTOR (RESISTANCE 2) #[COMPOUND-PROCEDURE 12349848])))) (PARALLEL-COMBINATION (SERIES-COMBINATION (PARALLEL-COMBINATION (RESISTOR (CAPACITANCE 2) #[COMPOUND-PROCEDURE 12348380]) (RESISTOR (RESISTANCE 2) #[COMPOUND-PROCEDURE 12349848])) (RESISTOR (INDUCTANCE 1) #[COMPOUND-PROCEDURE 12348916])) (SERIES-COMBINATION (RESISTOR (CAPACITANCE 1) #[COMPOUND-PROCEDURE 12347920]) (RESISTOR (RESISTANCE 1) #[COMPOUND-PROCEDURE 12349376]))) (PARALLEL-COMBINATION (SERIES-COMBINATION (RESISTOR (RESISTANCE 1) #[COMPOUND-PROCEDURE 12349376]) (SERIES-COMBINATION (SERIES-COMBINATION (RESISTOR (RESISTANCE 2) #[COMPOUND-PROCEDURE 12349848]) (RESISTOR (CAPACITANCE 2) #[COMPOUND-PROCEDURE 12348380])) (RESISTOR (CAPACITANCE 1) #[COMPOUND-PROCEDURE 12347920]))) (RESISTOR (INDUCTANCE 1) #[COMPOUND-PROCEDURE 12348916])) (PARALLEL-COMBINATION (PARALLEL-COMBINATION (RESISTOR (RESISTANCE 1) #[COMPOUND-PROCEDURE 12349376]) (RESISTOR (INDUCTANCE 1) #[COMPOUND-PROCEDURE 12348916])) (PARALLEL-COMBINATION (RESISTOR (CAPACITANCE 2) #[COMPOUND-PROCEDURE 12348380]) (SERIES-COMBINATION (RESISTOR (RESISTANCE 2) #[COMPOUND-PROCEDURE 12349848]) (RESISTOR (CAPACITANCE 1) #[COMPOUND-PROCEDURE 12786784]))))) 

1 ==> (pp sample-circuits)
((PARALLEL-COMBINATION
  (PARALLEL-COMBINATION
   (RESISTOR (CAPACITANCE 2) #[COMPOUND-PROCEDURE 12825804])
   (RESISTOR (INDUCTANCE 1) #[COMPOUND-PROCEDURE 12860504]))
  (PARALLEL-COMBINATION
   (SERIES-COMBINATION
    (RESISTOR (RESISTANCE 1) #[COMPOUND-PROCEDURE 12850388])
    (RESISTOR (CAPACITANCE 1) #[COMPOUND-PROCEDURE 12786784]))
   (RESISTOR (RESISTANCE 2) #[COMPOUND-PROCEDURE 12825788])))
 (SERIES-COMBINATION
  (SERIES-COMBINATION
   (RESISTOR (RESISTANCE 1) #[COMPOUND-PROCEDURE 12850388])
   (RESISTOR (INDUCTANCE 1) #[COMPOUND-PROCEDURE 12860504]))
  (PARALLEL-COMBINATION
   (RESISTOR (CAPACITANCE 1) #[COMPOUND-PROCEDURE 12786784])
   (SERIES-COMBINATION
    (RESISTOR (CAPACITANCE 2) #[COMPOUND-PROCEDURE 12825804])
    (RESISTOR (RESISTANCE 2) #[COMPOUND-PROCEDURE 12825788]))))
 (PARALLEL-COMBINATION
  (SERIES-COMBINATION
   (PARALLEL-COMBINATION
    (RESISTOR (CAPACITANCE 2) #[COMPOUND-PROCEDURE 12825804])
    (RESISTOR (RESISTANCE 2) #[COMPOUND-PROCEDURE 12825788]))
   (RESISTOR (INDUCTANCE 1) #[COMPOUND-PROCEDURE 12860504]))
  (SERIES-COMBINATION
   (RESISTOR (CAPACITANCE 1) #[COMPOUND-PROCEDURE 12786784])
   (RESISTOR (RESISTANCE 1) #[COMPOUND-PROCEDURE 12850388])))
 (PARALLEL-COMBINATION
  (SERIES-COMBINATION
   (RESISTOR (RESISTANCE 1) #[COMPOUND-PROCEDURE 12850388])
   (SERIES-COMBINATION
    (SERIES-COMBINATION
     (RESISTOR (RESISTANCE 2) #[COMPOUND-PROCEDURE 12825788])
     (RESISTOR (CAPACITANCE 2) #[COMPOUND-PROCEDURE 12825804]))
    (RESISTOR (CAPACITANCE 1) #[COMPOUND-PROCEDURE 12786784])))
  (RESISTOR (INDUCTANCE 1) #[COMPOUND-PROCEDURE 12860504]))
 (PARALLEL-COMBINATION
  (PARALLEL-COMBINATION
   (RESISTOR (RESISTANCE 1) #[COMPOUND-PROCEDURE 12850388])
   (RESISTOR (INDUCTANCE 1) #[COMPOUND-PROCEDURE 12860504]))
  (PARALLEL-COMBINATION
   (RESISTOR (CAPACITANCE 2) #[COMPOUND-PROCEDURE 12825804])
   (SERIES-COMBINATION
    (RESISTOR (RESISTANCE 2) #[COMPOUND-PROCEDURE 12825788])
    (RESISTOR (CAPACITANCE 1) #[COMPOUND-PROCEDURE 12786784])))))

1 ==> (plot-circuit (first sample-circuits))
(.001 2.001 .001 1.30612) 
() 

1 ==> (check-resonance (first-sample-circuits))
Unbound Variable FIRST-SAMPLE-CIRCUITS

2 Error-> 
Quit!

1 ==> (check-resonance (first sample-circuits))The circuit exhibits resonance between 0 and 2
 at the following frequencies: 
(.6) 

1 ==> (plot-circuit (second sample-circuits))
(.001 2.001 1.3372 333.338) 
() 

1 ==> (check-resonance (second sample-circuits))
The circuit does not exhibit resonance between the frequencies of 0 and 2
() 

1 ==> (maxes-and-mins (frequency-response-magnitude (second sample-circuits))
-1 1 0.1)
(-.1) 

1 ==> (plot-circuit (third sample-circuits))
(.001 2.001 .22449 1.99995) 
() 

1 ==> (check-resonance (fourth sample-circuits))
Quit!

1 ==> (check-resonance (third sample-circuits))
The circuit does not exhibit resonance between the frequencies of 0 and 2
() 

1 ==> (plot-circuit (fourth sample-circuits))
(.001 2.001 .001 1.90355) 
() 

1 ==> (check-resonance (fourth sample-circuits))
The circuit does not exhibit resonance between the frequencies of 0 and 2
() 

1 ==> (plot-circuit (fifth sample-circuits))
(.001 2.001 .001 .761394) 
() 

1 ==> (check-resonance (fifth sample-circuits))
The circuit does not exhibit resonance between the frequencies of 0 and 2
() 

1 ==> 
Quit!

1 ==> (EDIT)
==> Editor==> Scheme -- Loading editor zap file.
DEFAULT-SHARPNESS-THRESHOLD 
Zap value:
DEFAULT-SHARPNESS-THRESHOLD 

1 ==> (check-resonance (fifth sample-circuits))
The circuit does not exhibit resonance between the frequencies of 0 and 2
() 

1 ==> (define c1 (frequency-response-magnitude (fifth sample-circuits)))
C1 

1 ==> (define c1d (deriv c1 0.1))
C1D 

1 ==> (maxes-and-mins c1 0 2 0.1)
(.6) 

1 ==> (maxes-and-mins c1 0.5 0.7 0.05)
(.6) 

1 ==> (c1 0.6)
.761172 

1 ==> (c1d 0.6)
-.189035 

1 ==> (c1d 0.7)
-.647778 

1 ==> (c1d 0.5)
.751776 

1 ==> 
Quit!

1 ==> (EDIT)
==> Editor==> Scheme
() 

1 ==> (plot-circuit (fifth sample-circuits))
(.001 2.001 .001 .761394) 
() 

1 ==> (line-plot (deriv c1 0.01) 0 2 0.1)
(0 2. -.72322 1.71437) 
() 


1 ==> (sharp? c1 0.6 10)
() 

1 ==> (sharp? c1 0.6 1)
#!TRUE 

1 ==> (define c1dd (deriv c1d 0.01))
C1DD 

1 ==> (c1dd 0.6)
-7.07401 

1 ==> (define qd (deriv quad1 0.01))
QD 

1 ==> (define qdd (deriv qd 0.01))
QDD 

1 ==> (qd 4)
-.01 

1 ==> (qdd 4)
-2. 

1 ==> (check-resonance (fifth sample-circuits))The circuit exhibits resonance between 0 and 2
 at the following frequencies: 
(.6) 

1 ==> (plot-circuit (fourth sample-circuits))
(.001 2.001 .001 1.90355) 
() 

1 ==> (check-resonance (fourth sample-circuits))
The circuit does not exhibit resonance between the frequencies of 0 and 2
() 
*******************

#!TRUE 

1 ==> (plot-circuit (third sample-circuits))
(.001 2.001 .22449 1.99995) 
() 

1 ==> (check-resonance (third sample-circuits))The circuit exhibits resonance between 0 and 2
 at the following frequencies: 
(.7) 

1 ==> (tofu)
*******************
#!TRUE 

1 ==> (pp (make-subset-pairs '(1 2)))
(((1) (2)))

1 ==> (pp (make-subset-pairs '(1 2 3)))
(((1) (2 3)) ((1 2) (3)) ((1 3) (2)))

1 ==> (pp (make-subset-pairs '(1 2 3 4)))
(((1) (2 3 4)) ((1 2) (3 4))
               ((1 2 3) (4))
               ((1 2 4) (3))
               ((1 3 4) (2))
               ((1 4) (2 3))
               ((1 3) (2 4)))

1 ==> (pp (make-subset-pairs '(1 2 3 4 5)))
(((1) (2 3 4 5)) ((1 2) (3 4 5))
                 ((1 2 3) (4 5))
                 ((1 2 3 4) (5))
                 ((1 2 3 5) (4))
                 ((1 2 4 5) (3))
                 ((1 2 5) (3 4))
                 ((1 2 4) (3 5))
                 ((1 3 4 5) (2))
                 ((1 4 5) (2 3))
                 ((1 5) (2 3 4))
                 ((1 4) (2 3 5))
                 ((1 3) (2 4 5))
                 ((1 3 4) (2 5))
                 ((1 3 5) (2 4)))

1 ==> (tofu)

*************

#!TRUE 

1 ==> (circuits (list r1))

There are 1 circuits for 1 elements:

1. R1
1 

1 ==> (circuits (list r1 r2))

There are 2 circuits for 2 elements:

1. (+ R1 R2)
2. (// R1 R2)
2 

1 ==> 
Quit!

1 ==> (EDIT)
==> Editor==> Scheme
() 

1 ==> (circuits (list r1 r2 r3))

There are 8 circuits for 3 elements:

1. (+ R1 (+ R2 R3))
2. (+ R1 (// R2 R3))
3. (// R1 (+ R2 R3))
4. (// R1 (// R2 R3))
5. (+ (// R1 R2) R3)
6. (// (+ R1 R2) R3)
7. (+ (// R1 R3) R2)
8. (// (+ R1 R3) R2)
8 

1 ==> (circuits (list r1 r2 r3 r4))

There are 52 circuits for 4 elements:

1. (+ R1 (+ R2 (+ R3 R4)))
2. (+ R1 (+ R2 (// R3 R4)))
3. (+ R1 (// R2 (+ R3 R4)))
4. (+ R1 (// R2 (// R3 R4)))
5. (+ R1 (+ (// R2 R3) R4))
6. (+ R1 (// (+ R2 R3) R4))
7. (+ R1 (+ (// R2 R4) R3))
8. (+ R1 (// (+ R2 R4) R3))
9. (// R1 (+ R2 (+ R3 R4)))
10. (// R1 (+ R2 (// R3 R4)))
11. (// R1 (// R2 (+ R3 R4)))
12. (// R1 (// R2 (// R3 R4)))
13. (// R1 (+ (// R2 R3) R4))
14. (// R1 (// (+ R2 R3) R4))
15. (// R1 (+ (// R2 R4) R3))
16. (// R1 (// (+ R2 R4) R3))
17. (+ (// R1 R2) (+ R3 R4))
18. (+ (// R1 R2) (// R3 R4))
19. (// (+ R1 R2) (+ R3 R4))
20. (// (+ R1 R2) (// R3 R4))
21. (+ (// R1 (+ R2 R3)) R4)
22. (+ (// R1 (// R2 R3)) R4)
23. (+ (// (+ R1 R2) R3) R4)
24. (+ (// (+ R1 R3) R2) R4)
25. (// (+ R1 (+ R2 R3)) R4)
26. (// (+ R1 (// R2 R3)) R4)
27. (// (+ (// R1 R2) R3) R4)
28. (// (+ (// R1 R3) R2) R4)
29. (+ (// R1 (+ R2 R4)) R3)
30. (+ (// R1 (// R2 R4)) R3)
31. (+ (// (+ R1 R2) R4) R3)
32. (+ (// (+ R1 R4) R2) R3)
33. (// (+ R1 (+ R2 R4)) R3)
34. (// (+ R1 (// R2 R4)) R3)
35. (// (+ (// R1 R2) R4) R3)
36. (// (+ (// R1 R4) R2) R3)
37. (+ (// R1 (+ R3 R4)) R2)
38. (+ (// R1 (// R3 R4)) R2)
39. (+ (// (+ R1 R3) R4) R2)
40. (+ (// (+ R1 R4) R3) R2)
41. (// (+ R1 (+ R3 R4)) R2)
42. (// (+ R1 (// R3 R4)) R2)
43. (// (+ (// R1 R3) R4) R2)
44. (// (+ (// R1 R4) R3) R2)
45. (+ (// R1 R4) (+ R2 R3))
46. (+ (// R1 R4) (// R2 R3))
47. (// (+ R1 R4) (+ R2 R3))
48. (// (+ R1 R4) (// R2 R3))
49. (+ (// R1 R3) (+ R2 R4))
50. (+ (// R1 R3) (// R2 R4))
51. (// (+ R1 R3) (+ R2 R4))
52. (// (+ R1 R3) (// R2 R4))
52 

1 ==> (tofu)

*****************

#!TRUE 

1 ==> (circuits (list r1 r2))

There are 2 circuits for 2 elements:

2 

1 ==> (time (lambda () (list r1 r2)))
Unbound Variable TIME

2 Error-> 
Quit!

1 ==> (load "lyn:utilities.scm")

1 ==> (time (lambda () (list r1 r2)))

Computed in .02 seconds.
"" 

1 ==> (time (lambda () (list r1 r2 r3)))

Computed in .01 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3))))

There are 8 circuits for 3 elements:


Computed in .4 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3))))

There are 8 circuits for 3 elements:


Computed in 1.19 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3))))

There are 8 circuits for 3 elements:


Computed in .4 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3))))

There are 8 circuits for 3 elements:


Computed in .4 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3 r4))))

There are 52 circuits for 4 elements:


Computed in 2.61 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3 r4))))

There are 52 circuits for 4 elements:


Computed in 3.43 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3 r4))))

There are 52 circuits for 4 elements:


Computed in 2.54 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3 r4))))

There are 52 circuits for 4 elements:


Computed in 2.61 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3 r4 r5))))

There are 472 circuits for 5 elements:


Computed in 22.85 seconds.
"" 

1 ==> 
Quit!

1 ==> (EDIT)
==> Editor==> Scheme -- Loading editor zap file.
GENERATE-ALL 
Zap value:
GENERATE-ALL 

1 ==> 
Quit!

1 ==> (EDIT)
==> Editor==> Scheme
() 

1 ==> (define r2 (make-inductor 2))
R2 

1 ==> (define r4 (make-capacitor 4))
R4 

1 ==> (time (lambda () (circuits (list r1 r2))))

There are 2 circuits for 2 elements:


Computed in .39 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3))))

There are 8 circuits for 3 elements:


Computed in 20.26 seconds.
"" 

1 ==> (time (lambda () (circuits (list r1 r2 r3))))

There are 8 circuits for 3 elements:


Computed in 21.72 seconds.
"" 

1 ==> (tofu)