0 #pragma version 6 txn RekeyTo global ZeroAddress != txn CloseRemainderTo global ZeroAddress != || txn AssetCloseTo global ZeroAddress != || bnz label1 txn ApplicationID int 0 == bnz label2 txn OnCompletion int 0 == bnz label3 txn OnCompletion pushint 5 == bnz label4 txn OnCompletion intc 4 == bnz label5 txn OnCompletion int 3 == bnz label6 txn OnCompletion int 2 == bnz label7 txn OnCompletion int 1 == bnz label8 err label8: int 0 return label7: int 0 return label6: int 0 return label5: bytec 12 app_global_get bytec 7 == bnz label9 callsub label10 ! bnz label11 txn NumAppArgs int 2 >= txna ApplicationArgs 0 pushbytes 0x75706772616465 == && assert bytec 16 txna ApplicationArgs 1 app_global_put byte base64 aS50aW1lQ2hhbmdlZA== global LatestTimestamp itob app_global_put int 1 return label11: int 0 return label9: int 0 return label4: int 0 return label3: txna ApplicationArgs 0 pushbytes 0x6d696e74 == txn NumAppArgs int 3 == && bnz label12 bytec 5 callsub label13 bytec 7 == bnz label14 txna ApplicationArgs 0 pushbytes 0x6f666665725f666f725f73616c65 == txn NumAppArgs int 2 == txn NumAppArgs int 3 == || && bnz label15 txna ApplicationArgs 0 pushbytes 0x72657363696e645f6f66666572 == txn NumAppArgs int 1 == && bnz label16 txna ApplicationArgs 0 pushbytes 0x6d616b655f6f66666572 == txn NumAppArgs int 2 == && bnz label17 txna ApplicationArgs 0 pushbytes 0x657363726f775f6f66666572 == txn NumAppArgs int 2 == && txn GroupIndex int 0 > && bnz label18 txna ApplicationArgs 0 bytec 17 == txn NumAppArgs int 1 >= && bnz label19 bytec 5 callsub label13 bytec 8 == bnz label20 txna ApplicationArgs 0 pushbytes 0x7570646174655f6669656c64 == txn NumAppArgs int 3 >= && bnz label21 callsub label22 txn GroupIndex callsub label23 || txna ApplicationArgs 0 pushbytes 0x7570646174655f68617368 == && txn NumAppArgs int 2 == && txna ApplicationArgs 1 len pushint 32 == && txna ApplicationArgs 1 global ZeroAddress != && bnz label24 callsub label22 txna ApplicationArgs 0 pushbytes 0x636f6e74726163745f6c6f636b == && txn NumAppArgs int 2 == && txna ApplicationArgs 1 bytec 18 == txna ApplicationArgs 1 bytec 7 == || && bnz label25 txna ApplicationArgs 0 pushbytes 0x706f73745f6f66666572 == txn NumAppArgs int 3 == && txna ApplicationArgs 1 btoi int 0 > && bnz label26 err label26: int 1 label27: return label25: byte base64 aS50aW1lQ2hhbmdlZA== global LatestTimestamp itob app_global_put bytec 12 txna ApplicationArgs 1 app_global_put int 1 b label27 label24: itxn_begin int 3 itxn_field TypeEnum global CurrentApplicationAddress itxn_field Sender bytec 9 app_global_get btoi itxn_field ConfigAsset global CurrentApplicationAddress itxn_field ConfigAssetManager txna ApplicationArgs 1 itxn_field ConfigAssetReserve global CurrentApplicationAddress itxn_field ConfigAssetClawback int 0 itxn_field Fee itxn_submit int 1 b label27 label21: txn GroupIndex callsub label23 store 13 byte base64 aS50aW1lQ2hhbmdlZA== global LatestTimestamp itob app_global_put int 1 store 14 label32: load 14 txn NumAppArgs < bnz label28 int 1 b label27 label28: load 14 txnas ApplicationArgs load 13 load 14 callsub label29 int 0 == bnz label30 load 14 int 1 + txnas ApplicationArgs len int 0 == bnz label31 load 14 txnas ApplicationArgs load 14 int 1 + txnas ApplicationArgs app_global_put label33: load 14 int 2 + store 14 b label32 label31: load 14 txnas ApplicationArgs app_global_del b label33 label30: int 0 return label20: int 0 b label27 label19: txn GroupIndex callsub label23 store 11 byte base64 aS50aW1lQ2hhbmdlZA== global LatestTimestamp itob app_global_put int 1 store 12 label37: load 12 txn NumAppArgs < bnz label34 int 1 b label27 label34: load 12 txnas ApplicationArgs load 11 callsub label35 int 0 == bnz label36 load 12 txnas ApplicationArgs app_global_del load 12 int 1 + store 12 b label37 label36: int 0 return label18: bytec 6 callsub label38 int 0 > assert bytec 4 callsub label13 len int 0 == assert bytec 19 app_global_get pushbytes 0x61756374696f6e == assert bytec 5 callsub label13 bytec 8 == assert txna ApplicationArgs 1 btoi store 9 txn GroupIndex int 1 - gtxns TypeEnum int 1 == assert txn GroupIndex int 1 - gtxns Amount load 9 == assert txn GroupIndex int 1 - gtxns Sender txn Sender == assert txn GroupIndex int 1 - gtxns Receiver global CurrentApplicationAddress == assert byte base64 aS5taW50aW5nS2lja29mZkFtb3VudA== callsub label38 store 10 byte base64 aS5taW50aW5nS2lja29mZkNyZWF0b3IuYQ== callsub label13 len int 0 != bnz label39 label41: byte base64 aS5taW50aW5nS2lja29mZkNyZWF0b3IuYQ== txn GroupIndex int 1 - gtxns Sender app_global_put byte base64 aS5taW50aW5nS2lja29mZkFtb3VudA== txn GroupIndex int 1 - gtxns Amount itob app_global_put byte base64 aS50aW1lQ2hhbmdlZA== global LatestTimestamp itob app_global_put int 1 b label27 label39: load 10 pushint 10000000 + load 9 > bnz label40 itxn_begin int 1 itxn_field TypeEnum load 10 itxn_field Amount global CurrentApplicationAddress itxn_field Sender byte base64 aS5taW50aW5nS2lja29mZkNyZWF0b3IuYQ== app_global_get itxn_field Receiver itxn_submit b label41 label40: int 0 return label17: bytec 6 callsub label38 store 2 global GroupSize int 3 >= txn GroupIndex int 2 >= && txn Fee global MinTxnFee intc 6 * >= && ! bnz label42 load 2 int 0 == bnz label43 bytec 4 callsub label13 len int 0 != bytec 4 callsub label13 txn Sender != && bnz label44 txna ApplicationArgs 1 btoi store 3 load 3 store 4 byte base64 aS5taW50aW5nS2lja29mZkNyZWF0b3IuYQ== callsub label13 txn GroupIndex int 1 - gtxns Sender == bnz label45 label60: load 3 intc 7 < load 3 load 2 < || bnz label46 load 3 load 2 - store 5 load 3 load 5 - store 3 txn GroupIndex int 2 - gtxns TypeEnum intc 4 == txn GroupIndex int 2 - gtxns XferAsset bytec 9 app_global_get btoi == && txn GroupIndex int 2 - gtxns AssetAmount int 0 == && txn GroupIndex int 2 - gtxns Sender txn Sender == && txn GroupIndex int 2 - gtxns AssetReceiver txn Sender == && ! bnz label47 txn GroupIndex int 1 - gtxns TypeEnum int 1 == txn GroupIndex int 1 - gtxns Amount load 4 == && txn GroupIndex int 1 - gtxns Sender txn Sender == && txn GroupIndex int 1 - gtxns Receiver global CurrentApplicationAddress == && ! bnz label48 load 3 bytec 13 callsub label38 * pushint 1000 / store 1 txna Assets 0 bytec 9 app_global_get btoi != bnz label49 load 5 int 0 > bnz label50 label59: itxn_begin int 1 itxn_field TypeEnum load 3 load 1 - itxn_field Amount global CurrentApplicationAddress itxn_field Sender bytec 14 app_global_get itxn_field Receiver itxn_submit bytec 10 callsub label13 len int 0 != bnz label51 label58: byte base64 aS5taW50aW5nS2lja29mZkNyZWF0b3IuYQ== callsub label13 len int 0 != bnz label52 label57: byte base64 aS5vd25lci5h app_global_get txna Assets 0 asset_holding_get AssetBalance store 7 store 6 load 6 int 1 == bnz label53 global CurrentApplicationAddress store 8 label56: itxn_begin intc 4 itxn_field TypeEnum txna Assets 0 itxn_field XferAsset int 1 itxn_field AssetAmount global CurrentApplicationAddress itxn_field Sender load 8 itxn_field AssetSender txn Sender itxn_field AssetReceiver itxn_submit int 1 pop byte base64 aS5vd25lci5h txn Sender app_global_put bytec 14 txn Sender app_global_put load 3 bytec 20 callsub label38 > bnz label54 label55: byte base64 aS50aW1lQ2hhbmdlZA== global LatestTimestamp itob app_global_put pushbytes 0x692e74696d65507572636861736564 global LatestTimestamp itob app_global_put bytec 5 app_global_del bytec 4 app_global_del bytec 6 app_global_del byte base64 aS5taW50aW5nS2lja29mZkNyZWF0b3IuYQ== app_global_del byte base64 aS5taW50aW5nS2lja29mZkFtb3VudA== app_global_del load 3 itob log int 1 b label27 label54: bytec 20 load 3 itob app_global_put b label55 label53: byte base64 aS5vd25lci5h app_global_get store 8 b label56 label52: byte base64 aS5taW50aW5nS2lja29mZkNyZWF0b3IuYQ== app_global_get txn Sender != bz label57 itxn_begin int 1 itxn_field TypeEnum byte base64 aS5taW50aW5nS2lja29mZkFtb3VudA== app_global_get btoi itxn_field Amount global CurrentApplicationAddress itxn_field Sender byte base64 aS5taW50aW5nS2lja29mZkNyZWF0b3IuYQ== app_global_get itxn_field Receiver itxn_submit b label57 label51: itxn_begin int 1 itxn_field TypeEnum load 1 itxn_field Amount global CurrentApplicationAddress itxn_field Sender bytec 10 app_global_get itxn_field Receiver itxn_submit bytec 11 callsub label13 len int 0 != bz label58 bytec 10 bytec 11 app_global_get app_global_put bytec 13 bytec 15 app_global_get app_global_put bytec 11 app_global_del bytec 15 app_global_del b label58 label50: itxn_begin int 1 itxn_field TypeEnum load 5 itxn_field Amount global CurrentApplicationAddress itxn_field Sender txn GroupIndex int 1 - gtxns Sender itxn_field Receiver itxn_submit b label59 label49: int 0 return label48: int 0 return label47: int 0 return label46: int 0 return label45: load 3 byte base64 aS5taW50aW5nS2lja29mZkFtb3VudA== callsub label38 + store 3 b label60 label44: int 0 return label43: int 0 return label42: int 0 return label16: callsub label22 ! bnz label61 callsub label62 ! bnz label63 bytec 6 app_global_del bytec 4 app_global_del byte base64 aS50aW1lQ2hhbmdlZA== global LatestTimestamp itob app_global_put int 1 b label27 label63: int 0 return label61: int 0 return label15: txna ApplicationArgs 1 btoi store 0 global CallerApplicationID intc 5 != callsub label22 ! && bnz label64 global CallerApplicationID intc 5 != bnz label65 label70: load 0 intc 7 < bnz label66 byte base64 aS50aW1lQ2hhbmdlZA== global LatestTimestamp itob app_global_put pushbytes 0x762e6361416c676f2e302e6173 app_global_del pushbytes 0x762e646f6d61696e app_global_del pushbytes 0x762e656d61696c app_global_del pushbytes 0x762e74776974746572 app_global_del pushbytes 0x762e6c696e6b6564696e app_global_del pushbytes 0x762e66616365626f6f6b app_global_del pushbytes 0x762e74656c656772616d app_global_del pushbytes 0x762e646973636f7264 app_global_del pushbytes 0x762e676974687562 app_global_del bytec 6 txna ApplicationArgs 1 app_global_put txn NumAppArgs int 3 == bnz label67 byte base64 aS5taW50aW5nS2lja29mZkFtb3VudA== callsub label38 int 0 > load 0 byte base64 aS5taW50aW5nS2lja29mZkFtb3VudA== callsub label38 <= && bnz label68 bytec 4 app_global_del label69: int 1 b label27 label68: bytec 4 byte base64 aS5taW50aW5nS2lja29mZkNyZWF0b3IuYQ== app_global_get app_global_put b label69 label67: txna ApplicationArgs 2 global ZeroAddress != txna ApplicationArgs 2 byte base64 aS5vd25lci5h callsub label13 != && bz label69 bytec 4 txna ApplicationArgs 2 app_global_put b label69 label66: int 0 return label65: global GroupSize int 1 > txn GroupIndex int 1 + callsub label23 && txn GroupIndex int 1 + gtxns ApplicationID global CurrentApplicationID == && txn GroupIndex int 1 + gtxns TypeEnum intc 6 == && txn GroupIndex int 1 + gtxnsa ApplicationArgs 0 bytec 17 == && ! bz label70 int 0 return label64: int 0 return label14: int 0 b label27 label12: global CallerApplicationID intc 5 != bnz label71 byte base64 aS5taW50aW5nS2lja29mZkFtb3VudA== callsub label38 int 0 > bnz label72 label73: itxn_begin int 3 itxn_field TypeEnum pushbytes 0x4e4644 itxn_field ConfigAssetUnitName txna ApplicationArgs 1 itxn_field ConfigAssetName int 1 itxn_field ConfigAssetTotal int 0 itxn_field ConfigAssetDecimals int 1 itxn_field ConfigAssetDefaultFrozen txna ApplicationArgs 2 itxn_field ConfigAssetURL global CurrentApplicationAddress itxn_field ConfigAssetManager global CurrentApplicationAddress itxn_field ConfigAssetReserve global CurrentApplicationAddress itxn_field ConfigAssetClawback int 0 itxn_field Fee itxn_submit bytec 9 itxn CreatedAssetID itob app_global_put bytec 5 bytec 8 app_global_put byte base64 aS5vd25lci5h global CurrentApplicationAddress app_global_put itxn CreatedAssetID itob log int 1 b label27 label72: global CurrentApplicationAddress balance pushint 200000 - byte base64 aS5taW50aW5nS2lja29mZkFtb3VudA== app_global_get btoi < bz label73 int 0 return label71: int 0 return label2: txna ApplicationArgs 0 pushbytes 0x637265617465 == txn NumAppArgs pushint 12 == && bnz label74 int 0 label79: return label74: txna ApplicationArgs 7 btoi int 1 < txna ApplicationArgs 7 btoi intc 8 > || txna ApplicationArgs 9 btoi int 1 < || txna ApplicationArgs 9 btoi intc 8 > || bnz label75 bytec 12 bytec 18 app_global_put bytec 16 pushbytes 0x312e3132 app_global_put bytec 5 bytec 7 app_global_put pushbytes 0x692e74696d6543726561746564 global LatestTimestamp itob app_global_put byte base64 aS50aW1lQ2hhbmdlZA== global LatestTimestamp itob app_global_put pushbytes 0x692e6e616d65 txna ApplicationArgs 1 app_global_put bytec 14 txna ApplicationArgs 2 app_global_put txna ApplicationArgs 3 global ZeroAddress != bnz label76 label82: txna ApplicationArgs 4 global ZeroAddress != bnz label77 label81: txna ApplicationArgs 5 btoi int 0 != bnz label78 label80: bytec 10 txna ApplicationArgs 6 app_global_put bytec 13 txna ApplicationArgs 7 app_global_put bytec 11 txna ApplicationArgs 8 app_global_put bytec 15 txna ApplicationArgs 9 app_global_put pushbytes 0x692e63617465676f7279 txna ApplicationArgs 10 app_global_put bytec 19 txna ApplicationArgs 11 app_global_put int 1 b label79 label78: byte base64 aS5taW50aW5nS2lja29mZkFtb3VudA== txna ApplicationArgs 5 app_global_put b label80 label77: byte base64 aS5taW50aW5nS2lja29mZkNyZWF0b3IuYQ== txna ApplicationArgs 4 app_global_put b label81 label76: bytec 4 txna ApplicationArgs 3 app_global_put b label82 label75: int 0 return label1: int 0 return label23: store 15 load 15 gtxns Sender intc 9 asset_holding_get AssetBalance store 17 store 16 load 16 int 1 == load 15 gtxns CloseRemainderTo global ZeroAddress == && load 15 gtxns RekeyTo global ZeroAddress == && retsub label10: txn Sender intc 9 asset_holding_get AssetBalance store 19 store 18 load 18 int 1 == retsub label13: store 20 int 0 load 20 app_global_get_ex store 22 store 21 load 22 bnz label83 pushbytes 0x b label84 label83: load 21 label84: retsub label38: store 23 int 0 load 23 app_global_get_ex store 25 store 24 load 25 bnz label85 int 0 b label86 label85: load 24 btoi label86: retsub label22: byte base64 aS5vd25lci5h callsub label13 store 26 txn GroupIndex callsub label23 bytec 5 callsub label13 bytec 8 == && txn Sender load 26 == load 26 global CurrentApplicationAddress != && || bz label87 int 1 retsub label87: int 0 retsub label62: bytec 6 callsub label38 int 0 != retsub label35: store 28 store 27 load 27 extract 0 2 store 29 load 29 callsub label88 bnz label89 load 28 int 1 == bnz label90 byte base64 aS5vd25lci5h callsub label13 len int 0 == callsub label62 || bnz label91 txn Sender byte base64 aS5vd25lci5h app_global_get == ! bnz label92 load 29 callsub label93 bnz label94 load 29 callsub label95 load 27 extract 0 8 bytec 21 == ! && bz label96 int 1 retsub label94: int 1 retsub label92: int 0 return label91: int 0 return label90: int 1 retsub label89: int 0 return label96: int 0 retsub label29: store 35 store 34 store 33 load 33 extract 0 2 store 36 load 36 callsub label88 bnz label97 load 36 callsub label93 store 37 load 36 callsub label95 store 38 load 34 int 1 == load 38 load 37 load 35 int 1 + txnas ApplicationArgs len int 0 == && || && bnz label98 byte base64 aS5vd25lci5h callsub label13 len int 0 == callsub label62 || bnz label99 txn Sender byte base64 aS5vd25lci5h app_global_get == ! bnz label100 load 37 bnz label101 load 33 len pushint 8 > bnz label102 label104: load 38 load 35 int 1 + txnas ApplicationArgs len int 0 == && bz label103 int 1 retsub label102: load 33 extract 0 8 bytec 21 == bz label104 int 0 return label101: int 1 retsub label100: int 0 return label99: int 0 return label98: int 1 retsub label97: int 0 return label103: int 0 retsub label88: store 30 load 30 pushbytes 0x692e == retsub label93: store 31 load 31 pushbytes 0x752e == retsub label95: store 32 load 32 pushbytes 0x762e == retsub1
Grunschblog
Friday, September 23, 2022
NFD Domains Smart Contract (DeCompiled)
Just copied it from Algo Explorer
Sunday, May 27, 2012
Can't get this riff out of my head... "ta ta ta ta, ta ta ta ta, ta ta ta taaaa dum". What could it be? It's gotta be Beethoven. It's not Beethoven's 6th Symphony. "ta ta ta ta, ta ta ta ta, ta ta ta taaaa dum". Looked at all his symphonies. Not any symphony. But it's so symphonic! Hmmmmm... maybe it's a piano concerto. Poked around Beethoven's concertos. Ahhhh yes here it is:
Tuesday, April 10, 2012
Lunar Elevators
I recently saw a cool exhibit about space exploration at the American Museum of Natural History.
As part of the exhibit, it was proposed that a lunar elevator be built that would greatly ease take-offs from the moon. In particular, one could imagine a long cable connecting the surface of the moon to a top platform thousands of miles in space which seemingly floats without anything holding it up.
How could you do this? Imagine being at a point somewhere between the moon and earth. If you're on the moon, the moon's gravity is strongest and you'll be pulled towards it. If you're on earth, the opposite happens. Now as you move away from the moon and closer and closer to the earth, there exists a point at which the earth's pull and the moon's pull exactly equal each other out, and there is a zero net gravitational force.
I asked my Physics class to figure this point out today. In particular, supposed that a particle is positioned right between the earth and moon, at distance x from the earth. What should x be in order for the gravitational forces to cancel each other out?
To solve the problem, use Newton's law of gravity and set the earth's gravitational acceleration equal to that of the moon's:
The analysis above was only a first approximation. A better approximation should take the centrifugal force into account. But how good of an approximation was the student calculation? A little analysis shows that Eq. 1 above should be modified as follows:
We can see that there is one real solution
Finally, this is still not the best approximation. We've totally ignored all the cables and other material hanging between the platform and the surface of the moon. These cables etc. are required to make the elevator operational so that personell can be transported between the platform and lunar surface. Solving the third approximation problem requires deciding on a design, and the answer of where the platform should be located will depend on which design is used. Additionally, even if we settle on a particular design, computing the location of platform is non-trivial as it requires numerically intebrating a solution to Eq. 2 over the entire length of the elevator.
However, we can make a simple deduction: Each mass below the solution to Eq. 2 will cause a pull towards the moon on the entire elevator which will need to be counterbalanced by making the platform a little higher. I.e., we can be certain that any elevator design will need to have it's platform located closer to the earth than 325,000 km.
As part of the exhibit, it was proposed that a lunar elevator be built that would greatly ease take-offs from the moon. In particular, one could imagine a long cable connecting the surface of the moon to a top platform thousands of miles in space which seemingly floats without anything holding it up.
How could you do this? Imagine being at a point somewhere between the moon and earth. If you're on the moon, the moon's gravity is strongest and you'll be pulled towards it. If you're on earth, the opposite happens. Now as you move away from the moon and closer and closer to the earth, there exists a point at which the earth's pull and the moon's pull exactly equal each other out, and there is a zero net gravitational force.
I asked my Physics class to figure this point out today. In particular, supposed that a particle is positioned right between the earth and moon, at distance x from the earth. What should x be in order for the gravitational forces to cancel each other out?
To solve the problem, use Newton's law of gravity and set the earth's gravitational acceleration equal to that of the moon's:
(Eq. 1) GM / x 2 = Gm / (D-x)2where G is Newton's gravitational constant, M is the earth's mass, m is the moon's mass, and D is the distance between the earth and moon. Solve this using the quadratic formula to obtain:
x = D( 1 ± / √ (m / M) / (1 - m / M )Plugging in the following values
- D = 3.85 e +8 m
- M = 5.97 e +24 kg
- m = 7.475 e +22 kg
We get
x ≈ 0.89 D ≈ 3.4 e +8 mIn other words, the platform should be around 89% of the way from the earth to the moon, or about 340,000 km from earth and about 45,000 km from the moon.
The analysis above was only a first approximation. A better approximation should take the centrifugal force into account. But how good of an approximation was the student calculation? A little analysis shows that Eq. 1 above should be modified as follows:
(Eq. 2) (2 π / T )2 x = GM / x 2 - Gm / (D-x)2where the additional variable T represents the period of the moon around the earth and is equal to 27.3 days (Hint: this is 1/12 less than a lunar month....). Unfortunately, this requires solving a quintic. However, one can solve this equation numerically using a program such as Mathematica, or Wolfram Alpha. In fact, here is a solution using Wolfram Alpha where I've plugged in
- T = 2.36 e+6 s
- G = 6.67 e-11 m3 / (kg s2)
We can see that there is one real solution
x ≈ 3.25 e +8 mSo the second approximation puts the elevator platform 325,000 km from earth and 60,000 km from the moon. Does it makes sense that taking into account the centrifugal force we need to put the platform closer to earth than the first approximation of 340,000? Sure, because if we put the elevator at our first approximation point, the gravity would equal out and thus the centrifugal force would simply "pull" the platform away from earth. Thus, taking centrifugal force into account requires putting the platform closer to earth, in fact, 15,000 km closer.
Finally, this is still not the best approximation. We've totally ignored all the cables and other material hanging between the platform and the surface of the moon. These cables etc. are required to make the elevator operational so that personell can be transported between the platform and lunar surface. Solving the third approximation problem requires deciding on a design, and the answer of where the platform should be located will depend on which design is used. Additionally, even if we settle on a particular design, computing the location of platform is non-trivial as it requires numerically intebrating a solution to Eq. 2 over the entire length of the elevator.
However, we can make a simple deduction: Each mass below the solution to Eq. 2 will cause a pull towards the moon on the entire elevator which will need to be counterbalanced by making the platform a little higher. I.e., we can be certain that any elevator design will need to have it's platform located closer to the earth than 325,000 km.
Monday, April 2, 2012
Using Emmy Noether's Ideas to Prove All Numbers Interesting
A great article about Emmy Noether recently appeared in the New York Times. My colleague Jon Rosenshine noticed it too. We wondered whether her ideas were accessible to eighth and ninth graders. So I did a little research and discovered that Noether is responsible for Noetherian induction, which is a proof technique used in algebra. Though it is a very powerful technique in higher mathematics, in it's most simple form it can be used to prove facts encountered in middle and high school. For example, one can use Noetherian induction to prove that every positive number greater than 1 is either prime, or can be decomposed as a product of prime numbers.
To illustrate how Noetherian induction works, let's instead prove the following pseudo-theorem:
All whole numbers are interesting.
This is a rather odd statement. But let's see if it makes any sense. Start with 0. Certainly 0 is an interesting number. It represents the absence of something. No other number has this property which shows that it is interesting. 1 is also quite interesting for many reasons. For example, it is the only number that cannot be expressed as a sum of smaller positive numbers, and also it is the only number that when multiplying other numbers does not change them (e.g. 1*3 = 3, 1*9=9, and so on). 2 is also very interesting. It is the smallest prime number, though other reasons make it interesting too. 3 is interesting as it is the smallest odd prime number. 4 is interesting, as it is the only positive number that is the product and sum of the same number ( 2+2 = 2*2 = 4 ). I could go on but proving individually that every number is interesting will make this blog infinitely long, and that's a problem. So instead, let's use the Noether's powerful induction technique to prove it.
The proof goes as follows:
Consider the set of all non-interesting numbers, and call that set S. Noether's induction principle, applied to whole numbers says that any non-empty set of whole numbers must contain a smallest element. If S were non-empty, apply Noether’s induction principle to find a minimal element, call it u (u for un-interesting). But don’t you think that u -the smallest un-interesting number is pretty darn interesting? After all, it is the smallest amongst all un-interesting numbers, which makes it quite unique, and therefore interesting. Thus we have arrived at a contradiction since we have found a number that is both interesting and un-interesting and our original supposition that S is non-empty must be false. I.e., all numbers must be interesting.
What makes this is a pseudo-proof is that there is no
precise notion of what interesting
means and the proof is appealing to the reader’s emotion, but this basic proof method can be used to give real proofs of real theorems such as the prime number theorem mentioned above (that theorem is called the fundamental theorem of arithmetic).
Wednesday, January 18, 2012
Factoring - Continued
A smart student showed me the following trick for quick factoring. It shortens the factoring process tremendously so you don't have to do the difficult reverse distribution that factoring by grouping requires. We start with the first four steps as in my previous blog post. But now, we use the following trick starting at a new step 5:
Why does this method work? Assume that you started with the ax2 + bx + c you've found two numbers m and n with the property that mn=ac and m+n = b. The following algebra shows that the purported factors actually work.
= ax2 + ( m + n ) x + mn / a (simplify)
= ax2 + b x + ac / a ( use m+n = b and mn=ac )
= ax2 + b x + c (simplify)
5. Pretend you're factoring the monic quadratic x2 + bx + ac instead of ax2 + bx + c so factor it as ( x + m)( x + n ) which I'll call the "pseudo-factors"
6. Divide m by a in the first factor, and multiply x by a in the second factor obtaining ( x + m / a )( ax + n ) which is your final answer
7. You'll need to simplify. If you're trying to get a parabola into intercept form, just pull a out of the second factor. If you're trying to get integer answers, you'll be able to pull some term from a in the second factor and use it to get rid of the simplified denominator of the first factor.So with the example quadratic 4 x2 - 12 x - 27 in my previous blog post we obtained m = 6, n = -18 in the first four steps. Apply step (5) to get pseudo-factoring ( x + 6 )( x - 18 ). Apply step (6) with a = 4 to get the final answer ( x + 6/4 )( 4x - 18 ) which simplifies to ( 2x + 3 )( 2x - 9) when we pull a 2 out of the second factor and multiply it into the first.
Why does this method work? Assume that you started with the ax2 + bx + c you've found two numbers m and n with the property that mn=ac and m+n = b. The following algebra shows that the purported factors actually work.
( x + m / a )( ax + n )= ax2 + ( (m / a ) a + n ) x + (m / a ) n (FOIL)
= ax2 + ( m + n ) x + mn / a (simplify)
= ax2 + b x + ac / a ( use m+n = b and mn=ac )
= ax2 + b x + c (simplify)
Saturday, December 17, 2011
Planck Units - an algebraic exercise in unit conversion
I'm reading Leonard Susskind's "The Black Hole War". It's a really entertaining and fascinating accounting of his fruitful years long argument with Stephen Hawking over what happens to information when it falls into a black hole.
In Chapter 5 "Planck Invents a Better Yardstick" he describes how Planck came up with a much more canonical system of units than the metric system. In this system the 3 big constants all have value 1. These are: c the speed of light, ℏ Planck's reduced constant, and G Newton's gravitational constant.
It is an interesting exercise both algebraically and in unit conversion to figure out what the basic units of length, time and mass should be in order to make this happen. Start with the following definitions of the basic constants:
Then your goal is to convert units so that these three constants all end up equaling 1. You'll get 3 non-linear equations in three conversion factors. A very capable 9th grader should be able to do it.
I won't show you how to do it, but I'll give you the answer so you can check your work:
Letting l, t, and m are respectively the Planck units of length, time and mass and 1 meter = L l, 1 second = T t, and 1 kg = M m, and c, h, and G are respectively the speed of light, Planck's constant and Newton's gravitational constants as expressed in SI, you'll get the following results:
In Chapter 5 "Planck Invents a Better Yardstick" he describes how Planck came up with a much more canonical system of units than the metric system. In this system the 3 big constants all have value 1. These are: c the speed of light, ℏ Planck's reduced constant, and G Newton's gravitational constant.
It is an interesting exercise both algebraically and in unit conversion to figure out what the basic units of length, time and mass should be in order to make this happen. Start with the following definitions of the basic constants:
- c = 299 792 458 m / s
- G = 6.67300 × 10-11 m3 kg-1 s-2
- ℏ = 1.05457148 × 10-34 m2
Then your goal is to convert units so that these three constants all end up equaling 1. You'll get 3 non-linear equations in three conversion factors. A very capable 9th grader should be able to do it.
I won't show you how to do it, but I'll give you the answer so you can check your work:
Letting l, t, and m are respectively the Planck units of length, time and mass and 1 meter = L l, 1 second = T t, and 1 kg = M m, and c, h, and G are respectively the speed of light, Planck's constant and Newton's gravitational constants as expressed in SI, you'll get the following results:
- L = √ ( c3 / Gℏ ) = 6.19 × 1034 Planck lengths per meter
- T = √ (c5 / G ) = 1.86 × 1043 Planck time intervals per second
- M = √ ( G / ℏ c ) = 4.59 × 107 Planck mass units per kilogram
Sunday, October 23, 2011
NOD to the QROD - a mnemonic for converting improper fractions
I was trying to think of how to teach my kids about converting improper fractions to mixed form. The whole process is kind of confusing and easy to forget. I came up with the following mnemonic to help remember how to do it:
Or in general:
NOD to QRODWhat does that mean? It sounds like a mantra that fans might chant at a baseball game as their favorite baseball star QROD approaches the plate. "NOD to QROD, NOD to QROD, NOD to QROD"... Then QROD goes up to the plate, here's the pitch... it's a long drive deep to center field, it's going, it's going, it's gone. QROD hits a home run! Everybody in the park explodes with excitement as QROD circles the bases.
So with NOD to QROD, you can hit a home run every time you want to convert an improper fraction. So again, what does that mean?
Numerator Over Denominator to Quotient Remainder Over DenominatorYou always start with an improper fraction of the form Numerator Over Denominator. Your goal is to convert the fraction into mixed form. What that really means is that you should express the fraction as Quotient Remainder Over Denominator. For example suppose you wanted to convert the improper fraction 37/5 into mixed form. Reading the expression out loud we have "37 Over 5". The Numerator 37 is Over the Denominator 5. As I'll explain in the next paragraph, you'll need to do some long division and get a Quotient 7 and Remainder 2. Using the mnemonic, we need to write the answer as QROD. So Quotient 7 Remainder 2 Over Denominator 5 or 7 2/5. Summarizing:
N O D to Q R O D
37/ 5 = 7 2/5
So that tells you how to write the final answer, but it doesn't tell you how to get Q the quotient, or R the remainder. For that you'll need to know how to do long division, something that you will need to learn to do first. But once you know how to do long division, the Quotient is what you get on top, and the Remainder is what you get at the very end, when you've finished dividing the numerator as much as possible into the denominator. For example, the 37/5 example, you would do something like
7 ---------Quotient
_______
5 | 3 7
3 5
---
2 --------Remainder
Or in general:
Q Quotient
_______
Denominator D | N Numerator
.
.
. R Remainderso visually the NOD to QROD means:
___Q___
N/D = D | N = Q R/D
... R
Subscribe to:
Comments (Atom)