Though i didn't get that +1, might have overseen it somewhere.
The result was n!/k!^(n/k) and only works if k divides n. (Otherwise there is no answer to the question.
Forum Index > General Forum |
Simberto
Germany11032 Posts
Though i didn't get that +1, might have overseen it somewhere. The result was n!/k!^(n/k) and only works if k divides n. (Otherwise there is no answer to the question. | ||
Melliflue
United Kingdom1388 Posts
On December 15 2017 07:21 travis wrote: Show nested quote + On December 15 2017 04:38 Melliflue wrote: I'm not sure what you want. Is it this? And then you want to know how many such B there are. Is that right? If so, then for k = 1 there are no solutions, since the highest number you can pick is B = {n} and that is not big enough. . there is a miscommunication here. we make n choose k combinations, but these combinations are of size n/k, not of size k. so for k = 1, we would a single set of (1,2,3...n) which would be our single solution. Ah, sorry about that. So in what I wrote, you would need |B| = n/k. As Ciaus_Dronu said, the logic still works. Let j = n/k for convenience. There are n! permutations of 1,...,n. I split that into k blocks, each of size j. I don't care about the order within a block so I must divide by j! for each block, so that gives me (j!)^k. I don't care about the order of the blocks either so I divide by k! too. Final answer is (I only repeated what Ciaus_Dronu said to add that expression since they had trouble with their latex image.) I know this is almost what you and Simberto got too, minus a notational difference and a k! in the denominator for whether or not you care about the order of the blocks. I did miss some of the edits, but I wanted to give this explanation because I think it is neater. You get straight to the final answer without needing to simplify anything, and it nicely explains what that final expression means. I am still thinking about the case where duplicates are allowed. I have not yet seen a simple way to do that. | ||
amyamyamy
76 Posts
Basically I was wondering if there exists an elegant way to represent pi as an infinite continued fraction | ||
Simberto
Germany11032 Posts
Pi is usually weird and there is no simple fractional way of describing it (Aside from silly stuff like Pi/1 ) | ||
The_Templar
your Country52796 Posts
On December 18 2017 06:36 amyamyamy wrote: Hey I was messing around with continued fractions and I came across something I definitely couldnt figure out myself and something Google didnt help me understand either Basically I was wondering if there exists an elegant way to represent pi as an infinite continued fraction I'm pretty sure there are several based on the wolfram alpha page, in particular these two: | ||
amyamyamy
76 Posts
Obviously one could approximate pi and construct a continued fraction from that approximation but what im wondering is if theres another way to derive CF for pi | ||
Day_Walker
104 Posts
https://en.wikipedia.org/wiki/Gauss's_continued_fraction (The application to pi is in this section.) | ||
Deleted User 3420
24492 Posts
If any of you can figure it out, I would be very, very thankful. So thankful that in the future you may possibly (unlikely, but possible), get compensation. Say we have a number of elements, n. I have a target I want to reach: ( [the floor of(n-1)/2] - n - 1) This needs to be found over a sum of (n-2) steps. No more, no less. I need it to be distributed such that 1.) the summation uses all (n-2) steps and 2.) the size of the value being added in an earlier step is never lower than the size of the value being added in a later step and 3.) the size of the value being added in each step is as uniform as possible. example: n = 9 target sum: 22 number of steps: 7 example sum: 4+3+3+3+3+3+3 so, I realize the question might be a little non-specific, so there may be some wiggle room for interpretation. But hopefully it's enough information to garner a good general solution. thank you! | ||
Ciaus_Dronu
South Africa1848 Posts
Is this what you are aiming for: -------------------------------------------------------- Given some n positive integer. (This is weird to me as S will be negative) You now what to represent S as a summation of n-2 integers. And the sequence of integers is decreasing, and does not contain 0. Further, some idea of uniformity is desirable. -------------------------------------------------------- Are you sure there isn't a typo in your target value? Because it will be negative =/ | ||
The_Templar
your Country52796 Posts
| ||
Ciaus_Dronu
South Africa1848 Posts
On December 25 2017 02:20 The_Templar wrote: Maybe he meant the floor of (n-1)^2/2, and not (n-1)/2? That would make sense with the example given. So far splitting into cases where n is even / odd, I'm getting somewhere for even. Although it looks by far less technical and annoying than for n odd. EDIT: Still long and annoying though EDIT 2: Analysis for n even won't be fun to format here, can I link an online latex document when that's done? It'll only be for the even case unfortunately. Odd will likely take hours T.T | ||
Deleted User 3420
24492 Posts
So, (n-1) is squared. that's why in my example, with a value of n=9 we do: n-1 = 8. 8^2 = 64. 64/2 = 32. 32-1-n = 22 so our target is 22 again, sorry about the error, I need to check these more closely before I walk away. edit: just noticed the_templar predicted what I had meant. nice job edit2: I'm able to solve it in python(well, one possible solution.. depending on interpretation I think there are more), but I still don't know how to translate it to math, and having the math may make it more likely I can extract useful information to make my algorithm better. If it's helpful for you, this is the code: max = ((n-1)**2)/2 - 1 - n levels = n-2 min = max/levels other = max-(min*levels) max = min+1 maxlevels = other minlevels = levels-other this gives me a sum where the first "maxlevels" steps are of value "max", and the following "minlevels" steps are of value "min", and these values will vary by only 1 | ||
Ciaus_Dronu
South Africa1848 Posts
Fear not ^^ | ||
Ciaus_Dronu
South Africa1848 Posts
Overleaf link EDIT: You can click PDF on the top bar of the screen to get something easier to read. EDIT 2: Lots of typos, that is a "live" link so I'll fix them as I see them. | ||
Ciaus_Dronu
South Africa1848 Posts
EDIT: Solved. For odd numbers greater than 7 anyway (everything smaller you can have as its own case). I'll put in the solution soon, I just need to shower and then I'll type it up. | ||
Ciaus_Dronu
South Africa1848 Posts
If anything is unclear or poorly explained, just say and I'll fix it up. The link is here again: Link to read-only text EDIT: The conclusion is as follows: For n even, you want the first (n-5) terms to be n/2 - 1, and the last 3 terms to be n/2 - 2. For n odd, you want the first (n-1)/2 - 3 terms to be (n-1)/2, and the rest of the terms to be (n-3)/2. With the steps I have included, it is also easy to spot the special cases where all the terms can be the same and where this can't be done at all, although that's not difficult on its own. | ||
Acrofales
Spain17185 Posts
I am trying to find useful descriptors for a completely irregular (discrete) time series. And when I say completely irregular, I mean that it looks random, and is made to look even more random after a dfft. Here's an example: Every sample produces a series like this one. What I plotted here is the time series, the mean and mean + 1 std deviation for this sample, and mean, and mean +1 std deviation for the entire population. Mean - 1 std deviation is always < 0, so not very useful. What are useful ways for describing data of this kind of data? Because I am mostly interested in the peaks, their spacing and things, I was thinking of using the following descriptors: number of peaks > mean + 1 std dev. height of the highest peak (probably not meaningful data) %time > mean + 1 std dev. %time < mean. max time between peaks. min time between peaks. But they seem completely ad-hoc choices. Are there more principled ways of describing a time series with what appears to be no periodical component? Oh, what I forgot is that I can play with the window. I am now grouping events together by minute, but I can play with the window size, or do a sliding window (not sure what the point of that is in this case, other than to have a smoothing effect). Making the window size too small (10 sec) seems to make it uselessly jittery though. The peaks get broken up into seemingly meaningless rapid peak-vale-peak-vale intervals. 1 minute seems intuitively like a good trade-off between resolution and noise... but if there is a better way of analysing this, that would also help | ||
Kleinmuuhg
Vanuatu4091 Posts
| ||
Joni_
Germany351 Posts
What are sufficient conditions on a Banach Algebra to guarantee that an element whose spectrum is a subset of {0,1} is a projection, i.e., self-adjoint and idempotent? The Algebra being a C*-Algebra is certainly sufficient, but I'm specifically looking for weaker conditions, because C* is not guaranteed in my case. | ||
KR_4EVR
316 Posts
On December 18 2017 08:17 amyamyamy wrote: Oh what I meant is if theres an elegant way to derive a continued fraction representation (simple - or non-simple like your example) of pi. Obviously one could approximate pi and construct a continued fraction from that approximation but what im wondering is if theres another way to derive CF for pi There is (unlike what is suggested by the uneducated people who have told you otherwise). But to understand it you would have needed to have deep understanding of jacobi theta functions. However, I can give you a cleaner way. Remember arctan(1)=Pi/4, right? but also, arctan(x) = x - x^3/3+x^5/5-x^7/7+x^9/9 - .... so you can write: PI = 4 x (1-1/3 +1/5 -1/7 +1/9-1/11+1/13-...... ) Many other series of simmilar type abound. The best are in base 8 and base 16, though. The best one is called the BBP digit extraction algorithm because it literally allows you to finish computing one digit at a time before you have everything (think: base 16 more dense than base 10) It reads: PI = Sum over k from zero to infinity 1/16^k * [ 4/(8k+1)- 2/(8k+4) -1/(8k+5)-1/(8k+6)] Note that these aren't "magic numbers". They come from modular rings in base 17. | ||
| ||
Next event in 1d 3h
[ Submit Event ] |
StarCraft 2 StarCraft: Brood War Dota 2 League of Legends Counter-Strike Super Smash Bros Other Games Organizations
StarCraft 2 • Berry_CruncH148 StarCraft: Brood War• practicex 48 • aXEnki • intothetv • Gussbus • Kozan • IndyKCrew • LaughNgamez Trovo • Laughngamez YouTube • Migwel • Poblha League of Legends |
Kung Fu Cup
ESL Pro Tour
ESL Pro Tour
PassionCraft
ESL Pro Tour
World Team League
ESL Pro Tour
Korean StarCraft League
Afreeca Starleague
hero vs Soulkey
AfreecaTV Pro Series
Reynor vs Cure
[ Show More ] ESL Pro Tour
World Team League
ESL Pro Tour
BSL
Sparkling Tuna Cup
ESL Pro Tour
World Team League
ESL Pro Tour
BSL
ESL Open Cup
ESL Open Cup
ESL Open Cup
|
|