where is my math teacher ?

Y'know, other stuff, Sinclair related.
Post Reply
C.Born
Manic Miner
Posts: 253
Joined: Sat Dec 09, 2017 4:09 pm

where is my math teacher ?

Post by C.Born »

i had in mind i was allowed to add 192 pixel lines and 24 attr lines but :

Code: Select all

       BITMAP    +  ATTR
    (192*32*8)^2 + (24*32*8)^2     =2453667840
-------------------------------------------------------------------------
  ( (192*32*8)   + (24*32*8)  )^2  =3057647616

( ( (192*32)     + (24*32) )*8)^2  =3057647616

      ( (192+24) *32*8)^2          =3057647616

        (216*32*8)^2               =3057647616

             55296^2               =3057647616
from 0 to 3057647616 screens

but it STARTS with 2453667840

https://www.wolframalpha.com/input?i=%2 ... %29%29%5E2

https://www.wolframalpha.com/input?i=%2 ... 2*8%29%5E2

its still not my other insane calculation were i did 2 to the power of 3057647616 , erhm

what is the correct number of possible ZX screen$ 's and i can NOT add those two ???

van duffelen is dead and that the only good part ...
User avatar
Seven.FFF
Manic Miner
Posts: 753
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: where is my math teacher ?

Post by Seven.FFF »

A screen is ((256 / 8) x 192) pixel bytes + (32 x 24) attribute bytes = 6192 bytes total. I’m not sure what you’re trying to do with your numbers.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
AndyC
Dynamite Dan
Posts: 1426
Joined: Mon Nov 13, 2017 5:12 am

Re: where is my math teacher ?

Post by AndyC »

x^2 + y^2 is not the same thing as (x +y)^2

Easily confirmed by substituting small values like 2 and 3 for x and y.
C.Born
Manic Miner
Posts: 253
Joined: Sat Dec 09, 2017 4:09 pm

Re: where is my math teacher ?

Post by C.Born »

you are right
it was late and i cross eyed, no excuses

so on standard zx screen you ADD bitmap plus ATTR
but for calculating the maximum amount off existing screens you will have to multiply it
its ONE single bitmap in ANY colour bitmap=0 * ATTR(32*24*8) and then 6144*8

and secondly
i did have 'it' correct the first time its
2^8
and
2^3057647616

and i wont blame van duffelen although this "genious" only new 15 mathbooks by heart with out explaining ANY thing then the answer itself.
but thats a totaly different forum ...



PS
this is my "excuse"
viewtopic.php?p=127899#p127899
User avatar
ParadigmShifter
Manic Miner
Posts: 772
Joined: Sat Sep 09, 2023 4:55 am

Re: where is my math teacher ?

Post by ParadigmShifter »

x^2 + y^2 = (x+y)^2 - 2xy anyway. Although in a field of characteristic p (p prime) have a look at this :)

https://en.wikipedia.org/wiki/Freshman%27s_dream

The simple answer is 2^(6912*8) possibilities. But some of those look the same (same ink, paper, or inverse with paper/ink reversed too).

Windows calculator gives 2^(6912*8) as "Overflow" I thought they had changed it all to bignums (unlimited precision) now?

So get out the big guns...

https://www.wolframalpha.com/input?i=2%5E%286912*8%29

5.68381894821802238477548415740096128211544545887095973719... × 10^16645

WolframAlpha will show you all the digits if you want. It's of course way bigger than the number of subatomic particles in the observable universe though so I wouldn't try looking at every possibility in your lifetime/lifetime of the universe :)

EDIT: I think your calculation is wrong I make it 2^55296 = 2^(6912*8)


... unless you want to include one of the multicolour modes as well when it is bigger again.

Number of possibilities for bit patterns in N bytes is obviously 2^(N*8) giving familiar 256, 65 536, 16 777 216, 4 294 967 296which are of course the max values + 1 of what you can store in an 8, 16, 24, 32 bit number.

Even the number of GUIDs is only 2^128 ~= 10^38 which is smaller than the number of atoms in the observable universe (estimated between 10^78 and 10^82 apparently).
C.Born
Manic Miner
Posts: 253
Joined: Sat Dec 09, 2017 4:09 pm

Re: where is my math teacher ?

Post by C.Born »

ParadigmShifter wrote: Wed Oct 18, 2023 1:20 pm
EDIT: I think your calculation is wrong I make it 2^55296 = 2^(6912*8)
agree
i do way to much and make it difficult... maybe thats "duffelcult" ???
C.Born
Manic Miner
Posts: 253
Joined: Sat Dec 09, 2017 4:09 pm

Re: where is my math teacher ?

Post by C.Born »

WARNING!

DONT FEED ANY AI WITHOUT EXTRA NUCLEAR DIVISUSUS AS BACK UP BATTERY

Code: Select all

pseudocode:
positive integers
   for screens=0 to 2^(6912*8)
       write BINARY value screens TO
             ZX Spectrum Memory address 0x4000
       save file screensSCR
       call AI for FACES on screensSCR
             store SUCCES SCREENscr
       delete screensSCR
       next screens
endpseudocode
this will cost an enormous amount off energy, just to find a nice picture!!
User avatar
ParadigmShifter
Manic Miner
Posts: 772
Joined: Sat Sep 09, 2023 4:55 am

Re: where is my math teacher ?

Post by ParadigmShifter »

Well the good news is you can divide that number by 2^(64*8) for a kickoff since that rules out all pixel values in an 8x8 cell with ink and paper the same (8 out of the 256 values). It's still an extremely large number of course. EDIT: Double that since flash is also irrelevant then

I can't be bothered working out how many combinations would look the same for reversed ink/paper and inverted pixel patterns though, that will be quite a lot as well.

Hmm...so if we have ink and paper values, these are the possibilities / 256 for reversed ink/paper

01 and 10
02 and 20
03 and 30
04 and 40
05 and 50
06 and 60
07 and 70

(10 and 01 already covered above)
12 and 21
13 and 31
14 and 41
15 and 51
16 and 61
17 and 71

(20 02 and 21 12 already covered above)
23 and 32
24 and 42
25 and 52
26 and 62
27 and 72

etc. so reversing ink and paper (not both the same) there are 7 + 6 + 5 + 4 + 3 + 2 + 1 pairs = 28/256 and there is exactly 1 8x8 cell which is the inverted version of the original.

So those numbers will be relevant too ;)

I don't think bright black being the same as black makes much odds unless the pixels are all set (so that's 2 combinations I reckon).

Although I think I forgot about the cases where either the ink or paper is irrelevant (no pixels set or all pixels set). That doesn't apply if it is flash 1 though ;)

Can't be bothered thinking about it any more though :)
User avatar
ParadigmShifter
Manic Miner
Posts: 772
Joined: Sat Sep 09, 2023 4:55 am

Re: where is my math teacher ?

Post by ParadigmShifter »

C.Born wrote: Wed Oct 18, 2023 1:58 pm WARNING!

DONT FEED ANY AI WITHOUT EXTRA NUCLEAR DIVISUSUS AS BACK UP BATTERY

Code: Select all

pseudocode:
positive integers
   for screens=0 to 2^(6912*8)
       write BINARY value screens TO
             ZX Spectrum Memory address 0x4000
       save file screensSCR
       call AI for FACES on screensSCR
             store SUCCES SCREENscr
       delete screensSCR
       next screens
endpseudocode
this will cost an enormous amount off energy, just to find a nice picture!!
How long do you think that would take to complete? If you could store each bit in a subatomic particle (maybe as spin or charge or something, you might be able to store more than 1 bit per particle, not very many though), how much storage would you require? So I think amount of energy used is going to be the least of your worries.

Pretty sure the universe would consist entirely of black holes by then (maybe they wouldn't all have evaporated due to Hawking radiation by the time it finishes) and you'd need several universes worth of subatomic particles to store all the data.

EDIT: I see you are deleting the screenies once you looked at them so storage would be OK I guess, at least for a bit :) Although I see you are flagging each possibility as SUCCESS so you'd still need several universes worth of particles as storage ;)
User avatar
+3code
Manic Miner
Posts: 450
Joined: Sat Mar 19, 2022 7:40 am

Re: where is my math teacher ?

Post by +3code »

User avatar
ParadigmShifter
Manic Miner
Posts: 772
Joined: Sat Sep 09, 2023 4:55 am

Re: where is my math teacher ?

Post by ParadigmShifter »

Now known as the Hyperwebster I think which plays a pivotal role in proving that you can cut up a pea and reassemble it to make 2 peas the same volume (assuming the axiom of choice and allowing unmeasurable sets which require cutting along fractal boundaries).

https://en.wikipedia.org/wiki/Banach%E2 ... ki_paradox

this explanation goes into details about the Hyperwebster as well as an intro to the Paradox

Post Reply