#serious-discussion
1 messages ยท Page 146 of 1
Break it into addition
Log base 7 of 2/7 +1 +1
Log base 7 of 2/7 +2
But after you get below 1 it starts getting negative
So since your adding, log base 7 of 2/7 and 2, and log base 7 of 2/7 is negative, you know the answer is between 1 and 2
But 2/7 is closer to 0 than it is to 1
So just estimate a decimal
Like .35
Then put that between 1 and 2
So I guess that answer is 1.35
That's probably wrong
Because I estimated
But it's helpful I guess
The only limitations is that you can't do it to log base 1
But log base 1 has no values
So I guess that makes sense
Hmmmm
Let's see if that was right
,calc 7^x = 14
The following error occured while calculating:
Error: Invalid left hand side of assignment operator = (char 5)
Oof
log base 7 of 14 is around 11.83 lol
Its about 1.35 lol
YEEEEEEEE
I guessed it right
Thats good
To be fair I thought of this like yesterday
So still some tweaking needed
I guess you could use this for values that do work
Like log base 2 of 8
Break 8 into 2* 2 *2
So you get 1+1+1
Which is 3
That cool
tho 2/7 is about 0.285. not quite 0.35
so this seems very much like a coincidence idk
Probably
This is why I need to fix this
At last it tells you it's between 1 and 2
That's good
It also tells you if a value actually works for that log
Like if it has a whole number value
can you try to estimate log base 7 of 15 with this
ill try
Log base 7 of (15/7*7)
Log base 7 of 15/7 +1
Log base 7 of 15/49 +2
So it's between 1 and 2 now
I guess
But it's closer to 1
i dont think u have to do the third step
Oh yeah
Your right
But if it was like 15/2
Then the next would be 15/4
So we can't really know we can stop just with that step
log_7(7 * 15/7)
1 + log_7(15/7)
and we know 15/7 is just a little bit over 2 (since 14/7 = 2), and since the base is 7 that means that the answer is between 0 and 1. add one to that and u get that the value is between 1 and 2
so i guess its nice
Yeah
I feel like doing that last step is nicer on the brain
Since you can get all the way to the negatives and then just subtract by two
WAIT
I think we can separate 15/7 into log base 7 of 15 - log base 7 of 7
Nope
That's useless
It just undoes a step
Since log base 7 of 7 is one
But we are subtracting
So you remove one
And go back to the original
I am going to work on this method
To make it more exact
Yeah
Just keep repeating the process
Until the log gets below 1
Then you know it's between the outside value and 1 less than the outside value
Actually
I just realized
The value could be anywhere underneath the outside value
Since if the remaking log value is small enough you could subtract more 1 value
Is it ok if the first time I see the formal limit definition I find it a bit circular? lol
what do you think is circular about it?
idk I just saw a video
Like the epsilon delta stuff tells you the error. So less error closer you get. I get that. What is a limit then. An aproximation so close you get how the function behaves. But how close?
2+2= -5
I am not saying is wrong I am saying I find it a bit wierd compared to the derivative definition which makes more sense
a limit is a number
I just find it a bit counterintuitive I guess...
and if the sequence has a limit L then this number would satisfy all this epsilon-delta stuff
it doesn't give you an algorithm to determine for arbitrary sequence what this number is
what you mean by cross product

I'm writing a presentation on program optimizations for a class I'm TAing (writing cache-friendly code, loop unrolling, etc) and I was wondering if anyone had any ideas for other methods of optimizing code
ah. code generation
Im looking at my course's book and it has examples, but theyre all pretty trivial and not so interesting
low hanging fruit: common subexpression elimination
off hand i am thinking you could look at what the O O2 and O3 flags do
and see if you could use those optimizations
there's a lot of easily accessible monographs on lcse and gcse
id prefer not having to teach too much about convoluted assembly
you could talk about branchless programming at a theoretical level
ah thats a good idea
hyou don't have to get into the grunge of how branch predictors actually wortk, that's probablyt above level for a UG class anyhow
i'm thinking about the optimizations i have to unroll while decompiling stuff
tbh i myself dont know how branch predictors work, this isnt a course i have so much knowledge in anyway. they asked me to TA it because they dont have enough TAs lol
like one i see in some environemtns (not in C because || and && have execution sequencing as part of their semantics), but this totally happens in SQL query planners) is inverting the order of boolaen operaitons to do the less expensive one first
thats interesting
do you have any advice on writing cache-friendly code? the course does focus a bit on the cache
are we talking about at the level of what a programmer should do or what a compiler can/will do automatically?
what a programmer should do
maybe also a bit about the compiler
beyond just locality
the problem with being cache-aware is that caches vary in size
or maybe specific clever tricks about locality
mostly just the usual, like using structures of arrays instead of arrays of structures
there's a tradeoff involved with that one
thats a thing?
i think the game developers call it "ECS"
like if you have an array of some structure, what'll happen (in C/C++, at least) is your array will have each structure in series, with the variables of each object arrayed one after another and each object arrayed one after the next
so if your code is going to scan through this array and access one field in each structure, that generates a memory acess pattern that fetches memory "sparsely", which causes a lot more cache line fetches than if you inverted this and had a structure of arrays. then your scan will fetch adjacent memory locations and use far fewer cache line fetches
ahhhh i see
the downside of this, of course, is that it's annoying to code in C or C++ because their natural model is to have an array of objects. you can write adapter classes, of course, but that sorto f metaprogramming is ugly af in C++ and can only be done manually in C
it's probably possible in C++ with a metric buttload of C++ template magic, buit i would not want to write or maintain that code
i have no idea what this would be like in rust
and in basically any other language you probably won't care
well, maybe ada, but i haven't looked at ada in three decades
the thing is, there's no "right" way to do this, because it's totally dependent on what your "typical" use cases are
right
well the idea of the class is to just give some ideas for ways to optimize programming, and this is a great example i think of ways to write something more cache friendly
even if it isnt always usable
sorta like why you have to know what your workloads are before you can determine what indices you should add to a sql table are
it's more cache friendly for one specific access pattern (which happens to be quite common)
we can h ope
i think i need to fill up two lectures about this, so if i explain it poorly enough maybe theyll ask enough questions to fill up my time
i've just been asked to write a presentation about a particular implemnetation detail of the g++ compiler that is causing a difficulty for the project i'm on now, and i'm mulling over how to do that, so i understand where you are coming from
i am pretty sure i undersatnd the issue but that doesn't mean i can explain in a way someone else can understand
in case you're curious: if a dynamically-loaded library include a class that has an inline method that accesses a class-level static variable, the resulting DLL cannot be dynamically unloaded when compiled with gcc for a target architecture that uses the ELF executable file format
since the project i'm on relies on being able to dynamically load and unload DLLs, and we support linux (which uses ELF), this matters to us
i dont remember enough c++ to understand this, but what is the project youre working on?
dfhack, a modding framework for dwarf fortress. links in profile
https://github.com/DFHack/dfhack/issues/4301 is the issue related to this problem, but i've been asked to provide a writeup that explains this in more detail
if we have some binary equation G of A, B thats like is this true A+G(A,B)=A+G(1,B)?
in binary
what do you mean by "in binary" and what is "G"
what is a "binary equation"
Hi guys! I'm a beginner in math(not completely but I want to revisit it from scratch) and so I want to apply for an university this year and I wonder what kind of things I should know before attending university classes. I'm targeting for UK universities for Computer Science degree. UK is not my native country and I think that the math taught in their school also quite differs from mine. Can someone tell me what are the things in math that every student must be familiar with or send some sort of roadmap? Any help will be greatly appreciated! thanks in advance))
First of all, I would start by saying maybe I would be right and maybe I would be wrong
Secondly, in my opinion you don't need to do Math all over again from scratch because for some reasons such as you're not gonna do a math degree although that you will still need math in CS, and with your knowledge of math you could enroll in the CS uni and take your courses and if you feel you don't understand something, go and study it, it would be better than doing everything from the beginning that some of it you might need and some not
Thirdly, which I highly recommend talk with email the uni of the prerequisite of knowledge you need to have
if the uni doesn't get back to you, speak with someone is at the same uni
or people have the same education system such as England for CS
I see so I don't need to study from complete scratch but I think I need to know at least school math because UK requires foreign students to study 12-grade in which they definitely teach some math so I thought it would be easier for me to study if I have some math background but I really don't know what sort of math they teach so I'm in confusion
nice idea I will give it a try thanks!
I don't know what's math for 12-grade but Khan Academy has some beginner's stuff
you could check it out
aha thanks)
Both the ACM and the Computer Society of the IEEE have model computer science curriculae. You should check those out. In Europe, they probably expect you to have already taken a calculus course intended for mathematicians, physicists, and engineers. Once in the program, you should expect a combinatorics course including computability and a calculus based algorithms course. As for calculus. Last I heard, the UK uses Newtonian notion while North America uses a version descended from Liebnitz.
Are math related coding questions allowed?
I dont see anywhere where anything about that is specified
Im currently making a 3D renderer and im having a really hard time so i came to here for help
if it is a math question ,yes
you are more likely to get answers on coding in the coding servers
Yea like thats ever gonna happen
I hope this server is more helpful though
most of the people who do math have never written any code or touched rendering
They dont know how camera perspectives work?
nope
How can you be so sure though?
you don't need to know how to code to study math
I mean yea but you should at least be able to know how camera perspectives work
Its infact an extremely easy equation
and rendering is such a specific thing to learn as well, like not even every programmer worked with rendering
you want a person who knows math, knows coding and worked with rendering
I have a person in mind but theyre close sourced
๐
Arghh
I think criver on this server knows something about it
criver?
but I'm pretty sure he's been saying that how stuff is done in rendering software is backwards to how it's done mathematically
it's a nickname
And who is this criver?
somebody who may or may not answer your question, at least he seemed like he fits all of these
Im asking so i can contact him...
Can you give me his discord username?
Maaan and i thought you said it was just a nickname; not his actual discord name
Though its best to ask him in a help channel right?
Ill just take that as a yes
i am fairly sure not even the uk uses newtonian notation given that his integral notation is just drawing a box around the function
UK does not use Newton or Leibniz notation, we use whatever the lecturer feels like using given the context
people actually unironically use box to integrate?
i can't say i've ever seen anyone use newton's notation for integration
i was worried ๐ญ
he had four different notations for integration, none of which anyone uses with any regularity
what is box
??
valley
one of the ways newton had to notate integratn was to enclose the integrand in a box
also used a vertical bar or tick mark above the integrand (usually only when the integrand was simple, such as just x)
the box notation is a bitch to typeset
my geodiff course used newton, leibniz, and lagrange
yeah i js cannot figure out how to get the dot inside
$\fbox{\dot y}$
this is cursed and not just because you forgor mathmode
valley
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
oh my god why dont u work
\fbox{$\dot y$}
sqeral
wtf is mathmode
fbox is a textmode macro
wow fuck this
\fbox falls out of math mode
youre gonna have to learn tex to become an elite-level colleger
so would i have to do $\dot \text{\fbox{y}} = y$
valley
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
welp
$\dot{\fbox{$y$}}=y$
sqeral
you just forgor braces
Hey guys im a high school student with an interest in math and i would be thrilled to dive into topics related to topology, complex analysis and differential equations. My question is where do i start? I'm not sure. I started leaening about set theory and related topics but like what would be the main topics i have to cover?
real analysis and linear algebra
Any good book recommendations?
I would like something that's not so difficult to understand
Technically you will require knowledge of proof writing before diving deeper into these subjects
So anything beyond basics of Calculus is required to know proof writing?
I'd recommend "Visual Group Theory" by Nathan Carter if you're interested in getting a exposure of advanced (undergrad) math
Also you can check out the video playlist "Proofs" on the channel Michael Penn, he has followed "Proofs" by Richard Hammack in those lectures, also the book is available for free online(in pdf version obviously).
Not much, especially in the beginning I'd say zero
Ok nice
this is so terrible lol
I'm also a high school student and tried reading analysis, algebra books and didn't understand anything, basically you need to have a certain level of mathematical maturity before you try to learn these subjects on your own using books and online resources alone
What's that?
Some kind of measurement I guess that's what integrals do, right?
Yeah but it's integrating over weird stuff
I know about general linear group, the O notation (landau symbol) amongst all those weird objects
I thought that was the orthogonal group
Lmao maybe it is
In this context at least
Ohh nvm you're right, it is that
integral expression for a certain part of an L-function (generalizing Riemann zeta)
looks like shit
Rather scary
it's just kind of tedious and notation heavy but the actual ideas involved are not that bad
like the most absolute baby case of this type of integral is something like
$Z_\infty(s,e^{-\pi x^2})=\int_{\mathbb{R}^\times}|x|^se^{-\pi x^2}\mathrm{d}x=\int^\infty_{-\infty}|x|^{s-1}e^{-\pi x^2}\mathrm{d}x=\pi^{-\frac{s}{2}}\Gamma(\tfrac{s}{2})$
nGroupoid
it's the same story in general but your Gaussian function gets more complicated, there is more shit to integrate over, you have to do it one matrix coefficient at a time, the answer is slightly more complicated, etc
omg a based \mathrm{d}x enjoyer

my life has never been as joyful
in less than two sentences sell me on upright d instead of just dx at the end of my integrals
\mathrm{d} reads more like an operator, d reads more like a variable
looks better and is correct
Good exercise for the fingers
i buy it
like it's not really that big a deal I just think it looks better and is technically more correct (even though the alternative hardly sacrifices understandability)
more keystrokes though yeah
I don't use macros 
\frac{\partial}{\partial x} over and over
i would kill myself if i didn't have macros
I mean if you're having to type the same thing a lot you can just use copy paste
idk I just don't like having to define a bunch of commands
it's definitely bad if you're collaborating
Now that i use the physics package I use \dd mostly for the better spacing
Before I had a macro to do hacky spacing
I occasionally define commands if it's like
some actual typesetting hackery or new symbols
simply don't collaborate
but I don't like defining macros for existing commands
\newcommand{\bR}{\mathbb R}
\newcommand{\bZ}...
I have a nice command which is like, for Hom sheaves you often typeset this in a silly way like \mathcal{H}om
and you can't write \mathcal{Hom} because it doesn't typeset right
but I have a command that makes it so \mathcal{Hom} typesets as \mathcal{H}om
$\mathcal{H}om$
or any \mathcal for that matter
person2709505
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
rakko
yeah this is a common thing that people do for Hom sheaves
sadly there is no lowercase mathcal
and mathmode text looks close enough
you just have to hack \mathcal to do the right thing
$\mathcal{H}\mathrm{om}$ looks kind of weird imo
nGroupoid
and it's very clumsy to type
Hey can anyone tell me if this is correct or not:
The quantity of real numbers between any two values is technically greater than the total quantity of rational numbers despite both being infinite because you cant create a bijective function that relates the two, as it will never be surjective
I made a command \prox{a}{b}{c} to typeset $prox_{a}^{b}(c)$, used it a few times in a document
Transparent Elemental
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)

-any two non-equal values
-what do you mean surjective? Are you talking about R->Q or Q->R? a function R->Q can be surjective, but a function Q->R cannot
And it being surjective isnt really an explanation for why you cant make a bijective function
Thanks for information! I will check them out
you werent banned, you were expelled from the advanced channels for incoherent spam
if you want i can ban you instead
so do i
i dont see how, i have a PhD in math
not computer science
cohere into a different server pal
that was not worth the time it took you to type it sorry
Me = chair monkey
what is the stabilizer of 5 in the cyclic group of order 15?
you have 10 seconds to answer before i ban you
no dont ban him this is funny
let him cook
the answer is trivial
sotrue
chatgpt speaks through this man beautifully
like a trumpet in the hands of angels
no, chatgpt would construct sensible english phrases
this is home grown
truly a work of art
his parents must be sturdy fellow
@neat lintel what do you think about the axiom of choice
The drug heโs doing is home grown for sure
LMAO
do you reject or accept it?
we can tell
Bro decided not to replace the word โofโ with ()
Ah yes, the Axiom of Choice! An elegant solution to many problems in mathematics, scholars everywhere sing its praise.
lmfaooo
Same, I understand the instinctive nature of things just by recognizing simple inputs
ur a markov chain stfu
no QUESTIONS
no MASTERS
no GODS
Thatโs like low level text prediction engine
yessir like the shit in your phone keyboard
anyway fun's over
awww bye willy i hope u learn to socialize
RIP William, PhD (2024-2024)
The Discord bot GenAI uses this exact algorithm
discussy will remember you )i promise)
lmfao
phd in the math
William P.H. Dingledong
He will come back stronger
and we will be ready
He will have 2 P.H.D. Next time
i did not plan for this
tragic that Z/5Z is the trivial group now...
but what IS the stabilizer of 5 in the cyclic group of order 15
my guess was 3 like an idiot idk what stabilizer is lmao
the set of elements x such that 5x = 5
that makes sense
so in the case of the cyclic group of order 15, that'll be the elements that are 1 mod 3
uh, the subgroup has cardinality 5
yeah i keep thinking thats what ur asking 
its {1, 4, 7, 10, 13}
reading is not my strong suit
yeah
what can you use stabilizers for? like, why worry about them
i am yanking your chain
can you split the group up or collapse it into a smaller one
AAGH
so the stabilizer is actually just 0
LMAO
were they right on purpose tho???
(this is true for all stabilizers in finite cyclic groups)
Fool
ngroupoid looking down on me shaking their head rn
yeah no shit its not multiplicative theres no inverse for 0
(Z/15Z)^* would be a wild ass "group"
ughhhh
lmao
orbit-stabilizer theorem mostly
wow you can use them for a theory invented because of them lmao
orbit-stabilizer is kinda rank nullity for groups
rank nullity is where a matrix has multiple identities, right?
I havent taken a lin alg course
i mean, rank nullity for groups is just the first isomorphism theorem
but like, orbit-stabilizer lets you do similar things to rank-nullity
yeah I think id need to watch a group theory intro vid to understand that
express the size of a group in terms of an element's orbit length and its stabilizer
oh that sounds neat
this fact gives you the Lemma that is not Burnside's
which is important in combinatorics
combinatorics gets real scary real fast lol
stabilizers are also just kind of a useful structural fact of a group though
theyre a convenient notion in a bunch of places
hmm I can see that
to be clear, this notion is used when referring to group actions specifically
stabilizers arent very useful when the group acts on itself lmao
the group can what???
hence why "stabilizer of 5 in a cyclic group of order 15" is a meme question
how is that not referring to the group action
well its just that
if the group is acting on itself
thats literally just the group structure
if you have ab = a in a group, what can you conclude about b
its identity i think
we only care about them when the element in consideration comes from another set
and the group is acting on that set
the typical example you might have is like
really just contained in themselves
imagine a set composed of different colourations of the 6 sides of a cube
so maybe you have 4 colour choices or whatever
and you consider the group action of the rotation group of a cube on this set
this group action corresponds to just... rotating the cube
so the stabilizer of an element will be all of the rotations that don't change the resulting sides
mhm
for example, if the net of your cube is like:
[green]
[red]
[blue][yellow][blue]
[red]
180 degree rotations along one of the axes will result in the cube being unchanged
yeah
but all other rotations will change which face is which
so the stabilizer of this particular element is the "trivial" rotation and a 180 dgree rotation about the green-yellow axis
(unless im having a brain fart and missing one)
this is a contrived example but you can see why this might be a useful thing to talk about
e.g. lets say you want to count all possible colourings of a cube up to rotational equivalence
so then why isnt that a group in itself? why is it applying actions to a different set?
so we dont want to double-count a cube colouring if we can just rotate an existing cube
the group itself is the rotations, the set it's acting on is the set of "colourings"
I see
rotations have a group structure since we can compose them associatively and undo them
so the group and set have to have some kind of shared structure then?
in theory you can combine whatever you want, but in practice yes we'll be concerned with objects that are naturally related
I see
wikipedia gives this as an example in fact (though it uses 3 colours, not 4): https://en.wikipedia.org/wiki/Burnside's_lemma#Colorings_of_a_cube
yeah I think I understand the stabilizer part pretty well now, thanks
...why?
well i mean, if you just take Z/15 and replace + with *
I'm interested in this idea of applying groups to sets, though. How does that end up being visualized in the general case?
obviously (Z/15Z)^ร does not have 15 elements
You said (Z/15Z)^*.
Both x and * to me means the group of units.
i have always seen the group of units denoted with ร
ยฏ_(ใ)_/ยฏ
not saying your convention is wrong
just havent seen it

the term for this is "group action" and theres a lot of literature on it
A whole lot!
@jagged forge got everything set up, the brightness settings are wonky, but im getting 10+x fps on valorant LMAO
some would argue that it's the whole purpose of groups, in fact
600-800 
(i would be among those "some")
ok, ill have to check that out once I get enough initial understanding
i mean if youve seen like
I wouldn't be. I'd say it's half the purpose.
the common examples of groups
permutations of a set, rotations or symmetries of a geometric object, etc
most of them feel like structural observations that arise when working with something else, no?
Permutation group on n elements acts on a set with n elements.
permutations of a set are naturally, yknow, paired with a set
your group action is just permuting a given set
Any finite group is a subgroup of the permutation group, so, there's that
yeah this fact is a lot more obvious if you think in terms of group actions
to the point of almost feeling trivial
OH!
like clearly its a sub set
Because g acts on G!
because it has to be
and then it makes sense that its a sub group or else shit would go really wrong in the action
namington is so good at explaining you learned it twice
i learn things much more than twice
let me goof around ๐ฅบ
group actions are frequently the most natural way to "visualize" facts about groups, the issue is that theyre harder to approach at first since they feel more abstract
Actions of a vector space such that each element acts linearly (that is, send each element to an invertible matrix) is called a representation. These are pretty important basically because linear algebra is nice and actions are important.
yeah I just meant if there's a nice way to visualize it in any case, eg some sort of graph representation
well, graphical representations are group actions
when you e.g. draw a particular polygon to use as an example of a dihedral group
wtf is 10+x fps
youre really depicting that dihedral group acting on that polygon!
but as mathematicians, we're used to abstracting things so we typically skip the step that connects the group to the graphical depiction
yeah I get that groups often have intuitive representations, but im looking for a more general one, yeah
well groups are a very very general notion so youre not going to find any graphic that suitably describes all of them
damn
...what's a graph representation?
...discrete finite automata?
for finite groups you can create multiplication tables
which is basically as specific as a DFA graph
directed finite acyclic blank?
uhh you have an accept state right
is it like a Markov chain but without the probability?
So, we have a directed graph, a start and an accept, and an input deciding transitions?
and you consume acharacter and move along the arrows
potentially multiple accept nodes, but yes
...so, is the finite state space what prevents this from being a Turing machine?
...and this is the thing that regex is, right?
finite state space and lack of a stack
umm I wouldnt say the finite space is what limits its cimputational power as much as its inabillity to store stuff
yeah
How is not every finite state machine an example of this?
and regex is a regular language yeah
isn't a stack a infinite state mechanism?
you have to increase the size of the dfa a lot faster than if you have a stack
but youre right that that isnt a "finite state machine"
Is this the Wolfram stuff
chmonkey...
Cellular automata
that stuff is fun too
to clarify the terminology here
Anything stupid I say is satire and on purpose
"finite state machine" means deterministic finite automata U nondeterministic finite automata
this like
matters a priori but doesnt matter in practice since these are equivalent
the proof of equivalence is nontrivial though
...nondeterministic finite automata?
one direction is easy, the other is annoying
yeah; in a deterministic finite automata, the transition function is, well, deterministic
so in a state x and an input i, f(x, i) takes on a single state value
for deterministic, each symbol in the language has one arrow out per node
but in a nondeterministic finite automaton, f(x, i)'s output is a set
Ah.
Like a nondeterministic Turing machine!
where we transition arbitrarily without reading input
right, same exact distinction
like nondeterministic turing machines, it's harder to model but much easier to prove things with
like with turing machines, we have that NFAs and DFAs are "equivalent" in the sense that you can construct a DFA that accepts the same input set any NFA does, and vice versa
one direction of the proof is immediate
the other is "obvious" but requires a bit of work (mainly to handle empty transitions)
you get superexponential blowup in the size of the automaton
the interesting thing is that, if you add a stack that you can push to and pop from, you no longer have equivalence
oh is it superexponential for dfa's?
nondeterministic pushdown automata are strictly more powerful than deterministic ones
ie there exist languages recognized by an NPDA that cant be recognized by any DPDA
i think so because of epsilon transitions?
i think its just exponential if not for those
ohhh yeah
but epsilon transitions fuck things up since you have to account for those "repeatedly" for each possible transition out of the state
yeah they annoying
i dont remember the details though so i might be wrong
its certainly at least exponential
yeah def
I just remember seeing somewhere that the worst case was like, 2^n or smth
but that couldve been w/o epsilons
that might be true
idk
theres a bunch of numerical facts about this stuff that no one actually cares about in practice since "combinatorics of models of computation" is like, 3 layers removed from anything that matters
lmfao
like you can bound the minimal size of the pumping constant as a function of the number of states
i think its like n + 1 or something
that sounds useless yeah LOL
So what does this mean computationally? Are NPDA turing complete?
nope
woah
theyre finite
like the stack can grow arbitrarily large but the underlying state space is finite
how many classes of computation like that are there then?
whereas in a turing machine, the state space is the stack, so thats not an issue
yeah
i dont know how youd quantify that
youd have to make models that are all provably computationally different from each other
wikipedia provides this hierarchy but it only features models people care about
im sure theres like
"in between models"
that are stronger than PDAs but weaker than TMs
and obviously theres models of computation stronger than turing machines
namely, the notion of a mathematical function
which is not restricted by needing to "compute" things using a "procedure"
ah yeah, like the busy beaver function
Or any function that's not computable
I never thought about functions like that
Like any noncontinuius functions
Or the function that tells you if a Turing machine halts
well i guess calling it a "model of computation" is ambitious lmao
yeah
since its neither a model nor does it do computation
but my point is that you can certainly construct more general things than a TM
its also still bounded by recursive enumerability in practice id think
but yeah in theory theres stuff stronger
fwiw you may be interested in https://en.wikipedia.org/wiki/Chomsky_hierarchy
The Chomsky hierarchy (infrequently referred to as the ChomskyโSchรผtzenberger hierarchy) in the fields of formal language theory, computer science, and linguistics, is a containment hierarchy of classes of formal grammars. A formal grammar describes how to form strings from a language's vocabulary (or alphabet) that are valid according to the la...
its not quite what youre after i dont think
but its close
yeah ik about that
ill have to come back with a more consice definition
I feel like there's a notion of computation that goes beyond accepting languages but I cant put my finger on it
the important thing is that "type-0", i.e. languages produced by a turing machine, can be produced by a set of general rules mapping any string of symbols and terminals to any other such string
so if youre still able to visualize computation as rules for matching strings (ie as grammars)
turing machine is the most general possible
I see
Do you know of a more general idea of computation than accepting or rejecting languages?
for comparison, PDAs accept rules for matching any nonterminal symbol to any string of terminals and symbols
this is why these grammars are called "context free"
the rules can only consider the symbol itself
not its "neighbours"
no
oof
yeah
so even if you introduce a lot of structure trying to exceed them
turns out that a turing machine can model that
very frequently
I feel like intuitively, theres a sort of "strength" measurement that could be applied more generally to things like functions, programs, logic systems and statements etc
and anything that cant be modelled by a turing machine is usually called "noncomputable"
like a noncomputable function or real number or whatever
yeah
which kind of like... definitionally restricts "models of computation"
to "turing machines, and weaker variants"
i am not sure if theres a way to generalize the notion of "computation" past turing machines but still feeling like, yknow, computation
like, idk, some sort of model "between" a turing machine and something powerful enough to solve the halting problem
yeah that seems a bit "axiom of choice"-ey to me lol
Im really just interested in seeing how powerful you could make a computation system before it becomes impossible to decide halting in it
or if there is a limit even
i guess part of the problem is that
if your model of computation can model, like, mathematics
and we can express its rules "sensibly" (i.e. recursively enumerably)
you run into goedel incompleteness
which basically bounds its complexity by a turing machine
trying to find something more powerful than a turing machine while not being able to do mathematics feels like a fools errand
but i guess that's assuming you allow unbounded sizes of numbers
like idk how i'd formally express that that's impossible
if its even possible to do so
but im sure theres some way to say "yeah this aint gonna work"
we could try to ditch this requirement, but then actually talking about this becomes impossible
so its no longer a "model" of anything lmao
yeah
Im not really looking for a single model though, I'm talking about a sort of measurement of powerfulness
i am sure smarter people than i have thought about this
yeah
yeah im not sure youll get much better than the chomsky hierarchy
damn
like there is an entire field of computability theory
to be clear
but it doesnt go past, yknow, computable
so turing machines AFAIK are an upper bound
(though maybe theres some people doing computability theory in more general settings, again im not an expert)
I dont want to go past it either really
i wanna like, measure the "percentage" turing complete something is lmfao
i mean theres turing degree but i dont think its quite what youre after
glancing at the wiki page it looks suprisingly close to what im thinking about
where instead of talking about accepting languages its a general desicion problem
accepting languages is a general decision problem, but i get what you mean
yeah i suppose
Id really have to flesh out my thoughts more on this, im sure when I do ill realize im trying to do something literally impossible lmao
im also suspicious that the notion you have in mind is totally ordered
mmm not really
im thinking more of like, uhhh, well shit i dunno
yeah ill get back to you on that 
gn for now
@fresh comet

ykpwbtzrgz
boring data structures class going on. join if you wanna and blast some music or smth
google meet
Meow
Meep
Peep
yeep
bad idea to withdraw from a course after being admitted to a masters?
depends on why you want to withdraw
Basically I have two functions:
void int_iter(int len) {
for (int i = 0; i < len; i++);
}
and
void long_iter(int len) {
for (long int i = 0; i < len; i++);
}
I would expect int_iter to run quicker or at the same speed as long_iter, yet long_iter runs substantially quicker on my machine. Any idea why?
I looked over the compiled assembly, they're both identical save loading using a dword vs qword
not without looking at the assembly
also, most compilers would optimize the loop out entirely if you specified any level of optimization at all
Thats what i would think, weirdly mine didnt
Maybe I should try running this on a friend's machine
lemme get these up on godbolt
compiled with msvc lastest no optimizatoin both of these generate identical machine code
the machine code for the functions is line for line identical
gcc 10.5 compiles them differently though
hmmmm
the loop in the int version is mov eax, DWORD PTR [rbp-4] cmp eax, DWORD PTR [rbp-20] jge .L4 add DWORD PTR [rbp-4], 1 jmp .L3 while the loop in the long version is mov eax, DWORD PTR [rbp-20] cdqe cmp QWORD PTR [rbp-8], rax jge .L8 add QWORD PTR [rbp-8], 1 jmp .L7
i'd be curious how you did profiling of these, since those loops are going to be screamingly fast and timing them is going to be difficult
the loops themselves should tit within at most two cache lines, and the data references should also fit within at most two cache lines, so really you're just testing the branch predictor
once the L1I and L1D caches are fresh, nothing is going to get in the way of the execution engine zipping around that loop as fast as it can
and really what will determine how fast it spins is the branch predictor correctly predicts "branch" on the jge instruction (since it's going to be a branch every time except the last iteration)
I set len to 10000000 and had it measure the average over 100 runs using getrusage
that's probably measuring OS overhead more than actual app peformance
but its consistently quicker
void int_iter(int len) {
for (int i = 0; i < len; i++);
}
void long_iter(int len) {
for (long int i = 0; i < len; i++);
}
int main(int argc, char** argv)
{
int_iter(1000000000);
long_iter(1000000000);
}```
that output above is from vTune, intel's profiler
they're essentially the same
hmmm
int_iter uses 209.031 ms, long_iter used 203.608ms
i tried profiling using unix time, now theyre essentially the same
of course, this is using msvc's compiler., which generated identical assemblies iirc
thats a little concerning because i profiled the rest of the material for my class similarly
gcc doesn't generate identical assemblies, so i'd except maybe slight differences
i don't have the infrastructure in place to do HW profiling on linux (it's not that it can't be done, i just am not set up to do it)
and i don;t offhand know how many i-slots cdqe requires. i'd be really surprised if it's more than 1, but would have to look
though i dont understand why profiling with getrusage consistently shows that long is quicker
i-slot?
getrusage is not using a HPET. you're measuring times that are barely largeer than the system timer ersolution here
timing a race with an hourglass
but i would expect it to sometimes show int being faster then
cdqe does appear to be one slot on every major processor revision
a naive analysis would suggest that the long version should run slower because it has four instructions in the loop instead of three, but with modern processors it rarely ever works that way
four instructions?
superscalar architecture means that the mov, cdqe, and cmp execution can overlap
including the conditional jump
oh hm, this is actually don't branch not branch just noticed that
oh i bet i know
it's probably due to the ALU being optimized to do 32-bit operations more efficiently
sorry

well, same thing
the issue is that when the alu does a 32-bit operation it's required to clear the top 32 bits of the register
this is architecturally mandated
yeah
the alu itself is at least 64 bits wide (it may actually be 128 bits wide)
so you actually get a performance penalty for downsizing
(also there are like nine alus in a single processor core, i'm simplifying)
unrelated, but do simd registers just dispatch to multiple alus at the same time
lemme look up the semantics for 32-bit MOV
i know 32-bit arithmetic ops clear the high half of the 64-bit register, not sure about MOV
probably depends on processor features
mov does too
the spec is frustratiningly vague
it discusses claering the upper half of the register only for moves to segment registers
oh i should redo my windows test with long long, i forgot that long on windows is only 32 bits
oh
well fuck me
i am running a more extensive test right now, 1 billion times in each loop, repeated 1000 times with the int loop first and 1000 times with the long loop first. this is tkaing a while
should be about 800 seconds clock time, or ~12 minutes?
i have 10 cores so it's not really a problem lol
thank you so much!
the reaosn for reversing the order in half the tests is in case there's a cache priming effect
yeah
overclock me baby
cpu speed is 4.52 GHz
ooh 4.65 GHz
ah just finished
the int version uses inc eax while the long long version uses inc rax
inc rax takes more time?
yes and no
answering that would require that i do microprofiling and look at instruction retirements
remember that this is a superscalar processor, it executes multiple instructions overlapping
so what you're really seeing there is where the pipeline stalls were
ah okay
the stalls in inc eax were probably due to having to wait for a replacement register to be available, presumably because they were all allocated to holding results not yet written to memory
id' be curious how many of the writes actually made it to memory as opposed ot being retired before being written
i think this getting to be beyond my paygrade
i tried running it using gprof, and im still seeing long running significantly faster
sure, you may well get different results with a different compiler
or with a different processor, i've got an i5-12600k which is alder lake, a different microarchitecture may perform differently
tbh this shit is complicated
i just wanted to give a simple reason to my students 
i am not an expert on intel microarchitecture, i know a bit here and there but not nearly enough to explain everything going on at that level
np that was actually interesitng and it's good to practice with the toolset
guys I had an idea (though I don't know if it already exists)
though it probably does tbh
what if we did the cauchy sequence definition of real numbers, except without the converging requirement?
a "excauchy" real number (extended-cauchy real number) would be an equivalence class of sequences from N to Q using your usual equal equivalence (for every epsilon there being an omega or something such that for all natural numbers gamma bigger or equal to that omega |g_(gamma) - f_(gamma)| <= epsilon)
so like (this is a bit informal but whatever) EC(0, 1, 2, 3, 4....) would be equivalent to EC(0, 2, 2+1/2, 3+1/3, ....) but not equivalent to EC(1,2,3,4,5....) or EC(1,4,9,....)
wait would multiplication be an issue?
like (5+1/5)5 being 26 while 5 *5 is 25
uh
well addition would work atleast
is there a way to make multiplication work?
wait could you do this with asymptotic equivalence instead of normal equivalence?
well then you need to deal with the problem of 0 uh
also addition might become a problem in that case
sorry for using the discussion page btw
So essentially two of these sequences are equivalent if the difference-sequence converges to 0 (using some preciser notion of convergence) ?
well my definition of convergence works for that
the problem is dealing with multiplication
since even though EC(0,1,2,3,4,5....) and EC(0,2,2+1/2,3+1/3....) are equivalent
I'm pretty sure EC(0,1,2,3,4,5....)EC(0,2,2+1/2,3+1/3....) would actually be (EC(0,1,2,3,4,5....))^2 + 1
since for example
5(5+1/5) is equal to 26 instead of 25 and 6(6+1/6) is equal to 37 instead of 36
Use "exponentially bounded" sequence (with basis r fixed above 1) and then restrict to convergence below this exponential factor, I'd say.
That would be a major restriction though.
exponentially bounded like <= Ke^(thetax) or something? (sorry i'm not familiar with that term)
yeah. along those lines, like with polynomials and their radius of convergence.
this problem has nothing to do with how fast it grows though?
My idea was just to impose other constraints, so that multiplication is well defined.
on second thought this wouldnt work out.
a = (a0, a1, a2, ...)
b = (b0, b1, b2, ...)
(a * b )n
= sum_k<=n BinCoefficient (n,k) * a(n-k)b_k
<= 2^n max{c_ar_a^n,c_b *r_b^n}
So each multiplication would blow up the "difference" by 2^n max{cr_a^n,c*r_b^n}, which AFAIK can only work if we use a cauchy sequence that decreases faster (asymptotically etc.) than all exponential functions, maybe inverse tetration or something.
by a^(n-k) do you mean a_(n-k) by the way?
I made a mistake, by a^n I mean the radius r_a, so that a_n < c*r_a^n
also what is r_a^n ?
well now I define r_a so that a_n <= c*r_a^n
analogous for b.
This only works for sequences for which such an r_a exists.
by the way why max? It's a_(n-k) times b_k after all
just an easy to work with upper bound.
no I mean wouldnt it be 2^n (c_a * (r_a)^n) (c_b * (r_b)^n)?
How do I solve, 1 (4/5) ?
No, we are only working with products of n numbers. But I left out the constants c_a, c_b.
This entire thing is very arbitrary though
Also I'm not sure how it avoids this problem, though proving that this problem exists would be more complicated I guess
(of course you would divide the sum by 2^n first)
My idea was that if we assume that the difference a-b, scales inversely to the tetration to the power of n (with n being the index.), it would still do so even if the sequence is element-wise multiplied with an exponentially growing sequence.
All of this feels very arbitrary though.
Maybe we should start at your definition again.
ok here are my requirements
- The sequences can be anything. Actual cauchy sequences, diverging to infinity, diverging to - infinity, going 0 1 0 1 0 1 forever, literally any function from N to Q (though the excauchy real numbers would be defined with equivalence classes of these sequences)
Number 1 might have to be restricted a bit (like in your definition) but whatever - addition and multiplication are both well defined under the equivalence class
- for all actual cauchy sequences a, b, c
a = b => a (extended =) b
a + b = c => a (extended +) b (extended =) c
a * b = c => a (extended *) b (extended =) c
I've noticed that these things might have the property of having a !=0 b!=0 ab = 0 being possible
(0, 1, 0, 1....) * (1, 0, 1, 0....) would be (0, 0, 0, 0) uhh....
hmm I can see this working, though I don't know why you need the sum
that was a mistake.
I think we shouldn't use the element-wise product, but instead:
(a*b)_n = sum_k a_k *b_n-k
rule 3
I want to have it "not be different" for real number inputs (since this is supposed to be an extension)
this is a convolution though
yeah
like I still want (3,3,3,3,3....) * (3,3,3,3,3.....) to be (9,9,9,9.......) (or something equivalent to that or something)
Ok then we stick to the element-wise product for the time being.
but under your definition it would be
(9,18,27,36,....)
well maybe that over n could work
or n+1 I guess
So right now we have {N --> Q} / {(a,b)| a-b is a cauchy null sequence}
We could try to define a metric.
defining a metric sounds a bit problematic
like how would you measure the distance between (0,1,2,3,4,....) and (0,1,4,9,16,...) using a real number
We just make something up. Obviously all the L_p metrics fail in this case.
I have no idea.
Lets try something else.
hmm ok
the sqrt of
sum from 0 to infinity of
({if -1<=a_n<=1 a_n, else 1/a_n} * (1/2^n))^2
hmm wait
this is a bit problematic
ignore this
it doesn't fulfill the x != y => d(x) != d(y) condition (sequences)
I was thinking maybe |(a0,a1,a2,a3,...)| = r so that a_n <= c*r^n
But this only work for sequences that grow at most exponentially.
its also not linear so nvm.
is it the minimum r for that?
yeah. The infimum tbp.
ok makes sense
I have a feeling that we wont find a metric for {N-->Q}
what about two excauchy sequences are equivalent if
- they are cauchy and equivalent as reals
- they are not cauchy
i think that would satisfy all your properties
that ruins the whole point
that's literally just R with one more extra number
The equivalence is well defined by saying that their difference is a cauchy sequence converging to 0. I think.
i know it ruins the point
well some semblance of the sequences getting "closer" to each other yeah
I think cauchy sequences fit the bill perfectly.
I was thinking about using asymptotic equivalence, but I would have to remove 0's (in the sequence) and it would have some of the 0-sequences be "not-equivalent"
also it would cause a problem with addition
my point was mainly that you need another property here to make them not satisfiable by the projective line
Is this supposed to be an axiomatic definition?
yep
I guess you can consider this the fourth condition
ok I'm not gonna force this one since it probably won't be feasable, you can ignore this one to be honest, but some waying of removing non-zero pairs (a,b) that when multiplied get zero (ab = 0)
Thats why we shouldnt stick to the element-wise product and use the cauchy product instead.
hmm
we are using the cauchy product / n+1 right?
wdym n+1?
(so that it coincides with rule 3)
the sum from 0 to n sums over n+1 things
I'm having 0 be in N btw
i dont think it matters
eh yeah
as n -> infinity it wont make a difference
well it does matter if you start from 0 to not get /0 but yeah
yeah
also I can see it perhaps mattering with infinitely growing sequences
like which
what I mean is like the difference between the sum/n and the sum/n+1 not converging to null
The problem we have is that our definition of equivalence does not work under multiplication with an infinitely growing sequence.
also ab = 0 while a!=0 and b!=0 is problematic too, though it's acceptable since this isn't exactly the only extension of real numbers with that property anyway
nevermind
ignore that comment
actually I want to check if that is possible or not under the cauchy sum
I'm looking into that also
Havent found anything yet.
my gut tells that its not possible.
not exactly
you get (1, 0, 1, 0, 1, 0....)
which is not zero
here's the definition of "equivalance" we're using right now btw
well the epsilon has to be bigger than 0 of course
and omega is a natural number
what no you get (1,0,1/3,0,1/5,0,...)
if its over n+1
1*1 + (-1 * -1) + (1 * 1)
uh
1x1 + (-1)x(-1) + (1)x1
is 3
divide by 3
get 1
=3?
(divide by 3)
3/3 =1

We should stick to the proper definition of the cauchy product and not divide by n+1.
Iโm correct right
yep
well then (1,1,1,1,...)*(1,1,1,1,...)= infinity
which is not ideal
No thats good
(1,1,1,1,...)^2 = (1,2,3,4,5,6,7,8,...)
I don't think dividing by n+1 is what's causing the problem here though
The unit under the cauchy product is (1,0,0,0,0,0,0....) IIRC.
shit its equivalent to 0.
looks right
nope that will get us nowhere I think.
