﻿ Cool math hacks
24 May, 2013, 22:34:15
 OmnomIRC You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

 Pages: 1 2 [3] 4   Go Down
 Author Topic: Cool math hacks -  (Read 3783 times) 0 Members and 1 Guest are viewing this topic.
Munchor

Offline

Gender:
Last Login: 21 May, 2013, 17:58:01
Date Registered: 16 October, 2010, 15:39:13
Location: Position
Posts: 6209

Total Post Ratings: +174

 « Reply #30 on: 08 May, 2011, 17:12:39 » 0

What is that formula for?

and why does your method work. They don't look like they would give the same result.

It worked in all exercises and my teacher then admitted my way is better.

That formula is for machines that heat, like heaters and stuff. W is power/potency, Qq is heat from hot source and Qf is heat from cold source.
 Logged
phenomist
LV4 Regular (Next: 200)

Offline

Last Login: 13 December, 2012, 08:27:04
Date Registered: 14 January, 2011, 02:56:20
Posts: 132

Total Post Ratings: +44

 « Reply #31 on: 09 May, 2011, 00:28:14 » 0

division by 2 semihack

128391284905932852 / 2:
lump up even blocks:
12 8 3912 8 4 90 5932 8 52 /2
divide by two without carry on each digit
01 4 1401 4 2 40 2411 4 21
+
05 0 0555 0 0 05 0555 0 05
06 4 1956 4 2 45 2966 4 26
= 64195642452966426.
 Logged

Level Designer for Graviter

[Disclaimer: I can't program for my life.]
piexil
LV2 Member (Next: 40)

Offline

Last Login: 20 May, 2013, 01:01:37
Date Registered: 21 May, 2012, 14:57:02
Posts: 35

Total Post Ratings: +2

 « Reply #32 on: 21 May, 2012, 15:33:14 » 0

I remember last year for freshman Honors Geometry, to save time on any formula equations for polygons >4 sides in length, I created an equation that my teacher couldn't disprove.

Alas, I hated geometry and have forgotten the equation since.
 Logged

Happybobjr
James Oldiges
LV11 Super Veteran (Next: 3000)

Offline

Gender:
Last Login: 22 May, 2013, 22:35:58
Date Registered: 01 June, 2010, 00:52:05
Location: IN, United States
Posts: 2273

Total Post Ratings: +100

 « Reply #33 on: 21 May, 2012, 18:21:21 » 0

lol
 Logged

School: East Central High School

Axe: １.０.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Non-Cas |||  OS: 1.1 |||  Build: Old  |||  84+ keypad.   Being lent out
____________________________________________________________
piexil
LV2 Member (Next: 40)

Offline

Last Login: 20 May, 2013, 01:01:37
Date Registered: 21 May, 2012, 14:57:02
Posts: 35

Total Post Ratings: +2

 « Reply #34 on: 21 May, 2012, 20:56:12 » +1

Fuck yes!

I found it on my facebook:
Area of any regular polygon is (1/D)(P^2)√3
Where D is double the amount of sides, and P is the perimeter.

It only works for regular polygons.
 Logged

The One And Only Serial Time Killing Catboy-Loli-Ballerino
LV10 31337 u53r (Next: 2000)

Offline

Gender:
Date Registered: 24 February, 2011, 17:10:56
Location: ¿¿¿
Posts: 1890

Total Post Ratings: +110

 « Reply #35 on: 21 May, 2012, 23:51:38 » 0

That's useful.
 Logged

In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names

Beware the Bitulator! ,.,./`My Artwork!
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)

Online

Gender:
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2382

Total Post Ratings: +49

 « Reply #36 on: 04 June, 2012, 06:28:41 » 0

Fuck yes!

I found it on my facebook:
Area of any regular polygon is (1/D)(P^2)√3
Where D is double the amount of sides, and P is the perimeter.

It only works for regular polygons.

I'd like to see a proof for that
 Logged

Spoiler for "Projects":
My current games I am working on our:
I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":

[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
Builderboy
Physics Guru

Offline

Gender:
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642

Total Post Ratings: +589

 « Reply #37 on: 04 June, 2012, 07:50:13 » 0

Fuck yes!

I found it on my facebook:
Area of any regular polygon is (1/D)(P^2)√3
Where D is double the amount of sides, and P is the perimeter.

It only works for regular polygons.

That is unfortunately incorrect Imagine what happens if we have a regular polygon with a large number of sides.  The 1/D would approach zero as the number of sizes increased, and P^2 would approach a constant as the number of sides increased (and the radius stayed the same).  Since the 1/D is approaching zero, the P^2 is a constant, and the √3 is a constant, the equation would approach zero for large values of D.  This is obviously not the case for real polygons
 Logged

Juju
Evil Fluttershy (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)

Offline

Gender:
Date Registered: 17 March, 2010, 07:46:57
Location: Québec, North Equestria
Posts: 4548

Total Post Ratings: +394

 « Reply #38 on: 04 June, 2012, 09:00:00 » 0

Yeah, just imagine a circle which is a regular polygon with infinite sides (D = ∞). So 1/∞ = 0 and everything*0 = 0. So it doesn't make sense.
 Logged

LuaIDE
Reuben Quest HD: The PC Remake

Spoiler for Other stuff:
Also Yuki "ジュジュ" Kagayaki
Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
Find what P+4zJ means and you get free candy! cc4daa9c4645bd123ed22e385ed701fd
#omnimaga on OmniNet, EFNet and Pesterchum
Fan of My Little Jim Bauwens: Losing the Game is Magic
Proud member of POLN - Ponys Oppositing Lol Names
Member of OBEL - Omnimaga Board of the EFnrgelnicshh Language - Office Omnimagois de la Langue FArnagnlçaaiiss
あなたはこのゲームを失った
Spoiler for Old spoileryception stuff:

Spoiler for Coming soon...:
Indefinitely halted [|.........] 10%
OmnomIRC Mobile [||||......] 40% (argh threads >_<)
Spoiler for Current/Past TI-related projects:
The Axe Parser Wiki / Founder and maintainer
Keytar Hero [|||||_____] 50% Engine done, wackiness left to do (Halted)
OmniOS
VVVVVV [||||______] 40% (Made most of the engine, extremely glitchy) (Gave it to Leafy)
░█▀█░█░█░█▀▀░█▀█░█▀█░█▀█░▀█▀░█▀▄
░█▀█░▄▀▄░█▀▀░█▀█░█░█░█░█░░█░░█░█
v0.1.0
░▀░▀░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀▀▀░▀▀░[|||||||||¦] 95ish% (Completed)
tilibs-wii? [._________] 0% (Nope.)
Spoiler for Spoilers:
<!---->
wxWabbitemu Developer
Spoiler for Other Userbars:

<!--Everything done, got 90% sudo apt-get install z80asm z80dasm-->
Spoiler for Quote:
We are in 2034. The situation on Earth is catastrophic. The ozone layer has been completely destroyed by the carbonic gas of automobiles, the chemical industries, and the poosh-poosh in little cans. In the end, the earth cooks under the rays of the sun. We must find a planet on which can live 6 billion idiots. The planetary federation turns to the strongest country in the world: Canada. It is Canadian knowledge that has allowed, on October 28, 2034, the launch of the spaceship Romano Fafard, which leaves earth to search the confines of the Universe. Where the hand of man has never set foot.
I hate TI right now
Quote from: jimbauwens
You make me lose the game
Spoiler for The real answer to life, the universe and everything:
Spoiler for Old HTML stuff:
<div style="margin:20px; margin-top:5px"><div class="smallfont" style="margin-bottom:2px">Spoiler for This is another spoiler: <input type="button" value="Show" style="width:60px;font-size:10px;margin:0px;padding:0px;" onclick="window.location.replace('http://goo.gl/QMET');"></div><div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none; ">HAHAHA SUCCESSFUL RICKROLL IS SUCCESSFUL</div></div></div><!-- old avatars:
http://fc00.deviantart.net/fs71/f/2011/120/d/f/nepeta_nyan_cat_by_supuru-d3f8tcx.gif
http://th01.deviantart.net/fs70/PRE/i/2011/099/5/b/rainbow_dash_derping_by_moongazeponies-d3dmg7l.png--><!---->
I may or may not be inactive during work hours (9AM to 5PM EST, Monday to Friday), so for any inquiries please leave a message after the beep and I'll answer you when I have time. Beep. Nevermind, I'm on vacation now.
leafy
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)

Offline

Gender:
Date Registered: 26 December, 2010, 05:27:03
Location: the ninth circle of hell
Posts: 1545

Total Post Ratings: +371

 « Reply #39 on: 04 June, 2012, 09:24:49 » 0

That does look suspiciously like the formula for the area of an equilateral triangle, though.
 Logged

In-progress: Blastlabs, TMJO, qb?, VVVVVV?
Finished: Tag, Tap, MFQT, Nyan
thepenguin77
z80 Assembly Master
LV10 31337 u53r (Next: 2000)

Offline

Gender:
Date Registered: 14 December, 2009, 04:21:52
Location: Purdue
Posts: 1484

Total Post Ratings: +778

 « Reply #40 on: 04 June, 2012, 18:07:43 » +1

If y'all wanna find the area of a regula' polygon, y'all oughta use these.

S = sides
R = radius to a corner
L = length of one side

Area = 1/2 * R2 * S * sin(360/S)

Area = 1/4 * L2 * S * cot(180/S)

(cot(x) == 1/tan(x))

Edit:
You'll have to use l'hopital's rule if you want to check circles.
 « Last Edit: 04 June, 2012, 18:08:47 by thepenguin77 » Logged

zStart v1.3.011 4-29-2013  zStart fully works on 83+BE's (except custom font)
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
-Runer112
blue_bear_94
LV7 Elite (Next: 700)

Online

Gender:
Date Registered: 09 May, 2012, 02:45:26
Location: Earth
Posts: 585

Total Post Ratings: +3

 « Reply #41 on: 04 June, 2012, 19:31:15 » 0

Does anyone remember C=2πr and A=πr2?
 Logged

Kraphyko (TI-89 Image Editor) 80%
Starvak 2 1%
TI-84+SE User (2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User (1.02)
Spoiler for Programming Languages:
TI-83+ Basic - 4
TI-83+ Asm - 1
TI-89 Basic - 2
TI-89 C - 2.5
Computer C - 2
GameMaker - 3
Java - 1.5
Racket - 3
Scala - 1
Le jeu.
Spoiler for Ultimate Internet Meme:
Spoiler for Banner:

This server is always updated to the newest snapshot. Please don't try to join it on 1.4.7.
Sunrise 3 will have to wait till about a week later.

XDXD[ , ]
({ , ,
, ,
, ,
, ,
, ,
, });
Spoiler for Give Internet!:
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)

Offline

Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3760

Total Post Ratings: +610

 « Reply #42 on: 07 June, 2012, 02:20:05 » 0

Hmm, I was fooling around with my math notes when I came across an old proof. I saw that all numbers of the form 4n+2 could not be expressed as the difference of two squares, but all other numbers could. However, I pretty much left it at that. Let me tell you now that there will be a really cool hack with this, but there is more to the story. Anyway, I was looking through another notebook and some of my work on the Putnam two years ago and I saw a familiar proof where I showed that all integers >2 are in at least one pythagorean triple (I had broken down the problem to requiring only this to be true). Anyways, all I did was design a formula where, given a value A, you could get a B and C. Anyways, the process to designing the formula sparked an idea. Here is the awesome math hack:

I had shown that all integers not of the form 4n+2 could be expressed as the difference of two squares, so essentially, I have A2-B2=c. If we look at only odd integers for c, however, we get magic. If c is odd, there is a trivial solution for A and B:
A=(c+1)/2
B=(c-1)/2

But guess what? A2-B2=c can be factored to (A-B)(A+B)=c. DO you know what this means? Here:
• If c is prime, the trivial solution is the only solution
• If c is composite, there is more than one solution

I have been using this to write really fast factoring algorithms in assembly and I have been trying to figure out if there is a polynomial time method to finding if A2-B2=c has more than 1 solution (aside from using the AKS primality test on c). If you can find a way, then you can potentially run a very fast prime testing algorithm. Other than that, since I made this connection, I have been putting tons of energy toward following every path I can with this.
 Logged

Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]

Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
Grammer
TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
(Winning program of zContest2011)
-BatLib- One of the most feature packed libraries for BASIC programmers available
with over 100 functions and a simple programming language
-Learning to program z80 in hexadecimal before using an assembler (no computer was
available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█

ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)

Online

Gender:
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2382

Total Post Ratings: +49

 « Reply #43 on: 07 June, 2012, 02:59:52 » 0

Thats real nice Xeda any way I could see the proofs used for that?
I don't doubt your right I just find proofs interesting and would like to see them
 Logged

Spoiler for "Projects":
My current games I am working on our:
I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":

[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)

Offline

Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3760

Total Post Ratings: +610

 « Reply #44 on: 07 June, 2012, 03:46:40 » +1

First, let me clarify that I am working solely with positive integers (natural numbers).
These proofs are not very formal, sorry. Typing them is a bit more tedious than writing them on paper

Theorem: All integers except those of the form 4n+2 are the difference of two squares.
Proof:
Here, I will simply show by cases.
Let A be odd, B be even. That is, A=2n+1, B=2m. Then:
• A2-B2=
• (2n+1)2-(2m)2=
• 4n2+4n+1-4m2=
• 4(n2+n-m2)+1=
• 4l+1

Now, let A be even, B be odd. That is, A=2n, B=2m+1. Then:
• A2-B2=
• (2n)2-(2m+1)2=
• 4n2-4m2-4m-1=
• 4(n2-m2-m)-1=
• 4k-1=
• 4(k-1)+3=
• 4l+3=

If both are even, you have:
• A2-B2=
• (2n)2-(2m)2=
• 4n2-4m2=
• 4(n2-m2)=
• 4l

If both are odd, you have:
• A2-B2=
• (2n+1)2-(2m+1)2=
• 4n2+4n+1-4m2-4m-1=
• 4(n2+n-m2-n)+1-1=
• 4l
[qed]

These are all the possible case, so you can have 4l,4l+1,and 4l+3 as the difference of two squares.

As a very simple proof that all odd integers can be the difference of two squares, just plug in the trivial solution (c+1)/2 and (c-1)/2 for A and B respectivels. Since c is odd, c+1 and c-1 are even, so you can divide by two. For a process to arrive to this conclusion, forst note that the difference of two consecutive squares is odd. That is:
(n+1)2-n2=n2+2n+1-n2=2n+1

So if you want to find, say, 23 as the difference of squares, 23=2n+1 means n=11. So 122-112=23. The powerful result of the math hack I presented says that because 23 is prime, this is the only solution.

Theorem: If c is composite and odd, then there is a non-trivial solution for A2-B2=c.
Proof:
Let c be composite. That is, let c=n*m where n and m are neither 1. Since A2-B2=(A-B)(A+B), let n=(A-B) and m=(A+B). Then:

n+2B=A+B
n+2B=m
2B=n-m
B=(n-m)/2      ;since c is odd, n and m are odd, so n-m is even.
A=(n+m)/2      ;This, too, is an integer.
[qed]

Theorem: If c is an odd prime, then the non-trivial solution for A2-B2=c is the only solution.
Proof:
Assume there is a non trivial solution for A and B, A=D, B=E. This implies that (D-E) and (D+E) are factors of c. Since c is prime, the only factors are 1 and c. Therefore, (D-E)=1, (D+E)=c. This means:

D+E=1+2E, D+E=c
1+2E=c
E=(c-1)/2
D=(c+1)/2

However, this is the trivial solution, so we have met a contradiction. Therefore, the trivial solution is the only solution
[qed]

EDIT: I opened up my notes and followed through some of my work and what I have found so far:
If there is a non-trivial solution for A2-B2=c, then it is of the form (A+2d)2-(B-4e)2 where d and e are integers. This will let me speed up my code as I can forget about half or 3/4 of the potential values. I am still working on cutting that down even more
 « Last Edit: 07 June, 2012, 15:33:44 by Xeda112358 » Logged

Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]

Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
Grammer
TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
(Winning program of zContest2011)
-BatLib- One of the most feature packed libraries for BASIC programmers available
with over 100 functions and a simple programming language
-Learning to program z80 in hexadecimal before using an assembler (no computer was
available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█

 Pages: 1 2 [3] 4   Go Up