• Log InLog In
  • Register
Liquid`
TeamLiquid Liquipedia LiquidDota LiquidLegends
EST 08:04
CET 14:04
KST 22:04
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[TQ] Best of the Best Tour W3 Recap3IEM Katowice RO24 - Group D Preview7IEM Katowice - A Totally Unbiased Trap Preview46IEM Katowice - RO24 Group B Preview9IEM Katowice 2021 - RO24 Group A Preview14
Community News
IEM Katowice 2021 - Playoff bracket49IEM Katowice RO24 - Group B & C results18BSL Season 11 - RO24 Group Stage - 26, 27 & 28 Feb22IEM Katowice - TY, Maru, Clem advance from Group A19IEM Katowice RO36 concludes, RO24 groups completed17
StarCraft 2
General
IEM Katowice 2021 - Playoff bracket IEM Katowice RO24 - Group B & C results How to Block Australia, Brazil, Singapore Servers IEM Katowice - A Totally Unbiased Trap Preview IEM Katowice RO24 - Group D Preview
Tourneys
[IEM 2021] Katowice World Championship - Round of 12 [IEM 2021] Katowice World Championship - RO24 Group D ITaX Trovo Weekly#22 - SpeCial, DRG, TIME & Hurric $65 The Pizza Pie: Season 5 Tournament 5 Korea Lite Cup #4 - $90 on 28th Feb Sun 3pm KST
Strategy
[G] PvZ Cheese: PartinG's "Adios Amigo" Build Simple Questions Simple Answers HuShang Tutorials Select Larvae + Morph unit Rapidfire
Custom Maps
Nexus Wars 2021 GUIDE Re-created map Ghost Tower Re-created map Wasteland
External Content
Mutation # 253 World on Fire Mutation #252 Triple Threat Mutation #251 Burning Legion Mutation #250 Out of Order
Brood War
General
Blizzconline: Starcraft Legends event [TQ] Best of the Best Tour W3 Recap BW General Discussion [StarCastTV] Update Thread BGH auto balance -> http://bghmmr.eu/
Tourneys
[BSL11] - RO24 - Group B & F - Friday 18:30 CET !! Jeez Weekly 2021 [STPL] Season 4 Week 9 Small VOD Thread 2.0
Strategy
More Brood War "Mysteries" explained Defusion by terrain – interesting Mine behaviour Sorry's TvP lategame Ghost strategies? Try My great strategy game
Other Games
Heroes of the Storm
[HotS] 2020: A Year in the Nexus HotS: WP and Funny Moments Hots Newbie here
General Games
Nintendo Switch Thread FF7 remake for PS4 announced The PlayStation 5 Destiny 2 - PC/Xbox/PS4 Diablo 2 thread
TL Mafia
TL Mafia Community Thread [M][N] Mafia Mafia: Mafia Edition {FlaSh}[Mini] Raceday [M][N] I'm a cop you idiot! - Round 4
Hearthstone
Is Hearthstone Gambling?
LoL General
LoL Tournaments
LoL Strategy
Community
General
US Politics Mega-thread Pain Relief Medicines [$25 OFF in 2021 USA] Coronavirus and You Ask and answer stupid questions here! Trading/Investing Thread
Fan Clubs
Cure Fan Club The TY Fan Club DongRaeGu Fan Club
Media & Entertainment
[Manga] One Piece Korean Music Discussion Anime Discussion Thread Movie Discussion! Dragon Ball Super Discussion
Sports
2020 NFL and College Football Corona Season 2020 - 2021 Football Thread NHL 21: Tony DeActivito Did Nazi That Coming UFC/MMA Discussion Thread Formula1 2019
Tech Support
Computer Build, Upgrade & Buying Resource Thread How do you decide if mobo/cpu dead? Stutter feeling...
TL Community
Ask TL Staff Anything The Automated Ban List
Blogs
Have it your way: a …
waywardstrategy
Balance Discussion
NonY
Yucatán Peninsula Travel Highl…
Tak3r
Singing "publically" for the…
JieXian
A Look Back At GSL Sea…
TheRealNanMan
A decade of Starcraft 2: 201…
Nakajin
IsoRTS Code
ChristianS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1185 users

The Math Thread - Page 6

Forum Index > General Forum
Post a Reply
Prev 1 4 5 6 7 8 32 Next All
Liebig
Profile Joined August 2010
France155 Posts
June 16 2017 20:47 GMT
#101
let f(n) be the result of your weird stuff for n

you have
f(0) = 0
f(2n + 1) = 2 * f(n) + 1
f(2n + 2) = f(n+1) + f(n) + 1

f(n)=n looks like a solution to me

travis
Profile Blog Joined May 2003
United States23841 Posts
Last Edited: 2017-06-16 20:53:29
June 16 2017 20:47 GMT
#102
On June 17 2017 05:39 hypercube wrote:
Did you try some numerical experiments?

Are you interested in an exact expression or only asymptotic behaviour? The second one seems to be just on the order of n.


I am starting to think there isn't a reasonable way to get the exact expression. I've looked analysis of this algorithm up online and there doesn't seem to be any exact analysis online.

This is actually an analysis of best case quicksort comparisons that I am trying to do, if you are familiar.

I can see conceptually how this would be in the ballpark of n, but can you show the math for that?

Also I solved the actual values for 1 to 20. Itst a bit odd. nowhere near n for low values.

On June 17 2017 05:47 Liebig wrote:
let f(n) be the result of your weird stuff for n

you have
f(0) = 0
f(2n + 1) = 2 * f(n) + 1
f(2n + 2) = f(n+1) + f(n) + 1

f(n)=n looks like a solution to me



I've never seen recursion used this way, gonna take a minute to wrap my head around this lol
edit: ok I get it. that's neat, But I am not as quick as you in using it to analyze the outcome
Team Liquid
Acrofales
Profile Joined August 2010
Spain15321 Posts
Last Edited: 2017-06-16 20:56:31
June 16 2017 20:54 GMT
#103
On June 17 2017 05:47 travis wrote:
Show nested quote +
On June 17 2017 05:39 hypercube wrote:
Did you try some numerical experiments?

Are you interested in an exact expression or only asymptotic behaviour? The second one seems to be just on the order of n.


I am starting to think there isn't a reasonable way to get the exact expression. I've looked analysis of this algorithm up online and there doesn't seem to be any exact analysis online.

This is actually an analysis of best case quicksort comparisons that I am trying to do, if you are familiar.

I can see conceptually how this would be in the ballpark of n, but can you show the math for that?

Show nested quote +
On June 17 2017 05:47 Liebig wrote:
let f(n) be the result of your weird stuff for n

you have
f(0) = 0
f(2n + 1) = 2 * f(n) + 1
f(2n + 2) = f(n+1) + f(n) + 1

f(n)=n looks like a solution to me



I've never seen recursion used this way, gonna take a minute to wrap my head around this lol

Well, it's m, such that m+1 is the greatest power of 2 less than n. However, add 1 for every power of 2 you encounter along the way. For instance n=16 has 8 sublists of size 2 (or greater), rather than 7. How many powers of 2 you'll encounter is hard to predict, but if you want asymptotic behaviour, take a completely absurd upper bound: say you have all m sublists with a size equal to a power of 2 (iow, all your sublists), even that would only give you 2m total lists (and is completely impossible), which is still O(n).
Simberto
Profile Blog Joined July 2010
Germany8384 Posts
June 16 2017 20:55 GMT
#104
On June 17 2017 05:39 hypercube wrote:
Did you try some numerical experiments?

Are you interested in an exact expression or only asymptotic behaviour? The second one seems to be just on the order of n.


Asymptotic is definitively at most order of n.

We can easily get an upper limit, because the kth step (with 0 being the initial set) produces <= 2^k new groups of numbers, and there are < log 2 (n) steps. Thus, there are definitively < Sum from 0 to log2(n) (2*k) = 2^(log2(n) + 1)-1 = 2n-1 total sets in this algorithm.

An exact number is going to be harder to get.
Liebig
Profile Joined August 2010
France155 Posts
June 16 2017 20:56 GMT
#105
Actually that's wrong, my bad
cause for n = 1, you should have 0 according to your rules, hmm

f(0) = 0
f(1) = 0
f(2) = 1
for n > 0, f(2n + 1) = 2 * f(n) + 1
for n > 0, f(2n + 2) = f(n+1) + f(n) + 1

f(n) = n doesn't work there, let me think a bit
travis
Profile Blog Joined May 2003
United States23841 Posts
Last Edited: 2017-06-16 20:58:34
June 16 2017 20:57 GMT
#106
So, this is actually from homework that I have been working on for a long time. The actual question is
"What is the fewest exchanges that the algorithm will execute for an input of size n. No
justification needed."

(What we have been doing demonstrates the best case for exchanges)

In exact counts, with n elements, if n =3 we do only 1 exchange. If n = 7, we do only 3 exchanges. if n = 15, we do 7 exchanges. After that it is always worse than this.

So does that mean that a technically correct answer to this question is: "(the floor of n/2) - 1" ?
Team Liquid
Amanebak
Profile Blog Joined December 2010
Czech Republic522 Posts
June 16 2017 21:00 GMT
#107
On June 17 2017 05:42 Simberto wrote:
Show nested quote +
On June 17 2017 04:53 Amanebak wrote:
Hey.
I stumbled across a problem like this:

What is the longest gondola that can take a right-angle turn of a Venetian canal? The width of the canal is 2, respectively 3 length units before, resp. after the turn.

I apologize for my English.


Unless i missed something, the result is 5*sqrt(2).

The gondola needs to be able fit into the diagonal of the (2+3)*(2+3) square, which has a length of 5 sqrt (2)

At that point, 2sqrt(2) of the gondola is in the thinner canal, and 3sqrt(2) is in the thicker canal. It is obvious that no longer gondola could reach as far into the 3m canal if you draw a picture of the situation, and the 5sqrt(2) gondola can continue onwards from this point on.

Thank you for your reply.

If I understand it correctly, gondola turned 45 degrees and touches sides of the canal at both ends and touches the 'inner' edge of the turning with its side. That is the diagonal of the (2+3)*(2+3) square. Yes, it can go on, but I don't think it could go back, unless it bends. To imagine, I propose to make the difference of widths greater, like 1 before turn and 100 after.
BW
hypercube
Profile Joined April 2010
Hungary2732 Posts
Last Edited: 2017-06-16 21:13:30
June 16 2017 21:04 GMT
#108
On June 17 2017 05:36 Acrofales wrote:
I thought I had a simple solution, but it breaks if any list in your subdivisions has length equal to a power of 2 (that adds 1, which can occur at different points in the tree). So doesn't work, and given the weirdness of your algorithm, I'm not sure there's an easy way of figuring out how often you'll run into a power of 2.


I think I have an idea. Let's write the sets in rows like travis did, so the k-th row will have 2^(k-1) sets. So if we need K rows, we will have 2^K - 1 sets in total. Unfortunately, this only works if we terminate in a perfect row (e.g. a combination of 3s and 2s, that can't be broken down with our rule).

So here's an outline:

0. Observe that there is at most two unique (and consecutive) elements in any given row.

1. Prove that there is at most 1 non-perfect row. That is a row which has both elements of n > 1 and n <= 1. I will refer to this as the final row.

2. Give a formula for the sum of elements in a row. This is doable because exactly one of n and n-1 so the sum of the child elements is one less than the parent element.

3. Use this formula to calculate the number of rows, up to and including the first non-perfect row. (call this K)

4. Use the same formula to calculate the number of ineligible elements in the final row. (call this D)

Using the original idea, the final answer is 2^K - D - 1.

edit: 3 seems the trickiest, I'm pretty sure I can do the others.
"Sending people in rockets to other planets is a waste of money better spent on sending rockets into people on this planet."
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
Last Edited: 2017-06-16 23:40:37
June 16 2017 21:05 GMT
#109
On June 09 2017 04:13 CecilSunkure wrote:
I've been eager to learn about Fourier transform. In particular I wanted to use it to do pitch adjustments of sound samples. I have some code here for playing sounds, and want to add some pitch adjustment stuff.

Would anyone mind chatting with me about the mathematics? I was hoping to find someone knowledge about Fourier transforms and their applications that I could bounce a bunch of questions off of. Please PM me if anyone would be so kind!


Well it took a while, but after some studying I ended up getting down an implementation. I referenced "Computational Frameworks for the Fast Fourier Transform" by Charles Van Loan. I also found two good reference implementations here and here. The first link is an implementation of some algorithms from the Van Loan book, which helped show a proper way to convert algorithms to C and verify for correctness. The second link by Paul Bourke is probably the most popular FFT implementation in existence. The Bourke implementation has a sort of nasty side-effect of scaling floating point error across the DFT, so for large inputs the results can zero out early. This can easily be fixed by adding in some direct cos/sin calls, so I did that.

In the end I got down my own implementation after referencing all 3 pieces mentioned above. Luckily all the Van Loan book is in vector and matrix algebra, something I'm already good at.

Anyways, here's my current implementation. I'll probably work on it a little more to create a more useful API. Also the final scale loop in the if statement ( sign < 0 ) would be a good candidate for SIMD ops. My implementation is in a more modern style than the older ones, so it should be a little faster due to less branch misses in favor of a little more raw computation. Also there's a symmetry to cut computational cost in half that I've yet to implement. But this is fine for now:

+ Show Spoiler +
#include <math.h>
#include <stdint.h>

#define PI 3.14159265359f

uint32_t Rev32( uint32_t x )
{
x = ((x & 0xAAAAAAAA) >> 1) | ((x & 0x55555555) << 1);
x = ((x & 0xCCCCCCCC) >> 2) | ((x & 0x33333333) << 2);
x = ((x & 0xF0F0F0F0) >> 4) | ((x & 0x0F0F0F0F) << 4);
x = ((x & 0xFF00FF00) >> 8) | ((x & 0x00FF00FF) << 8);
return (x >> 16) | (x << 16);
}

uint32_t PopCount( uint32_t x )
{
uint32_t a = x - ((x >> 1) & 0x55555555);
uint32_t b = (((a >> 2) & 0x33333333) + (a & 0x33333333));
uint32_t c = (((b >> 4) + b) & 0x0f0f0f0f);
uint32_t d = c + (c >> 8);
uint32_t e = d + (d >> 16);
uint32_t f = e & 0x0000003f;
return f;
}

uint32_t Log2( uint32_t x )
{
uint32_t a = x | ( x >> 1 );
uint32_t b = a | ( a >> 2 );
uint32_t c = b | ( b >> 4 );
uint32_t d = c | ( c >> 8 );
uint32_t e = d | ( d >> 16 );
uint32_t f = e >> 1;
return PopCount( f );
}

// x contains real inputs
// y contains imaginary inputs
// count must be a power of 2
// sign must be 1.0 (forward transform) or -1.0f (inverse transform)
void FFT( float* x, float* y, int count, float sign )
{
int exponent = (int)Log2( (uint32_t)count );

// bit reversal stage
// swap all elements with their bit reversed index within the
// lowest level of the Cooley-Tukey recursion tree
for ( int i = 1; i < count - 1; i++ )
{
uint32_t j = Rev32( (uint32_t)i );
j >>= (32 - exponent);
if ( i < j )
{
float tx = x[ i ];
float ty = y[ i ];
x[ i ] = x[ j ];
y[ i ] = y[ j ];
x[ j ] = tx;
y[ j ] = ty;
}
}

// for each recursive iteration
for ( int iter = 0, L = 1; iter < exponent; ++iter )
{
int Ls = L;
L <<= 1;
float u1 = 1.0f; // cos( pi / 2 )
float u2 = 0; // sin( pi / 2 )

float arg = 3.14159265359f / (float)Ls;
float wr = cosf( arg );
float wi = -sign * sinf( arg );

// rows in DFT submatrix
for ( int j = 0; j < Ls; ++j )
{
// do butterflies upon DFT row elements
for ( int i = j; i < count; i += L )
{
int index = i + Ls;
float t1 = u1 * x[ index ] - u2 * y[ index ];
float t2 = u1 * y[ index ] + u2 * x[ index ];
x[ index ] = x[ i ] - t1;
y[ index ] = y[ i ] - t2;
x[ i ] += t1;
y[ i ] += t2;
}

// Rotate u1 and u2 via Givens rotations (2d planar rotation).
// This keeps cos/sin calls in the outermost loop.
// Floating point error is scaled proportionally to Ls.
float z = u1 * wr - u2 * wi;
u2 = u1 * wi + u2 * wr;
u1 = z;
}
}

// scale factor for forward transform
if ( sign > 0 )
{
float inv_count = 1.0f / (float)count;
for ( int i = 0; i < count; i++ )
{
x[ i ] *= inv_count;
y[ i ] *= inv_count;
}
}
}
travis
Profile Blog Joined May 2003
United States23841 Posts
June 16 2017 21:17 GMT
#110
I am glad I set you guys off on a fun math journey. I figured out I was doing the question I was assigned completely wrong, which explains why it was so difficult. LOL
Team Liquid
Simberto
Profile Blog Joined July 2010
Germany8384 Posts
June 16 2017 22:05 GMT
#111
On June 17 2017 06:00 Amanebak wrote:
Show nested quote +
On June 17 2017 05:42 Simberto wrote:
On June 17 2017 04:53 Amanebak wrote:
Hey.
I stumbled across a problem like this:

What is the longest gondola that can take a right-angle turn of a Venetian canal? The width of the canal is 2, respectively 3 length units before, resp. after the turn.

I apologize for my English.


Unless i missed something, the result is 5*sqrt(2).

The gondola needs to be able fit into the diagonal of the (2+3)*(2+3) square, which has a length of 5 sqrt (2)

At that point, 2sqrt(2) of the gondola is in the thinner canal, and 3sqrt(2) is in the thicker canal. It is obvious that no longer gondola could reach as far into the 3m canal if you draw a picture of the situation, and the 5sqrt(2) gondola can continue onwards from this point on.

Thank you for your reply.

If I understand it correctly, gondola turned 45 degrees and touches sides of the canal at both ends and touches the 'inner' edge of the turning with its side. That is the diagonal of the (2+3)*(2+3) square. Yes, it can go on, but I don't think it could go back, unless it bends. To imagine, I propose to make the difference of widths greater, like 1 before turn and 100 after.


Hm, i calculated it another way, and got a better result:

Just take a look at any rectangle which touch the corner of the canal. Before (and after) the turn, they all have the lengths (2+x) and (3+y), where 2/y = x/3 (intercept theorem). Thus, we are looking at the diagonal of a rectangle with sides (2+x) and (3+6/x), and especially for the minimum of those diagonals.

The diagonal has the length of

f(x) = Sqrt((2+x)²+(3+6/x)²)
and thus the derivative of:
f'(x) = 1/2f(x) * (2*(2+x)- (12/x²)*(3+6/x)
Which you would now need to find the zeroes of. (I had mathematica do it because i am lazy, the zero is apparently at (18)^(1/3). (And further checks will almost certainly prove it to be a minimum
That means that the lowest possible length of the gondola is f( (18)^(1/3)), which you can simplify to Sqrt (13 + 6*18^(1/3) + 3* 18^(2/3)), which is about 7.02, and indeed slightly less than 5Sqrt(2). Sorry for that.
travis
Profile Blog Joined May 2003
United States23841 Posts
Last Edited: 2017-06-16 22:41:25
June 16 2017 22:39 GMT
#112
edit: NEVERMIND I GET IT
Team Liquid
BrTarolg
Profile Blog Joined June 2009
United Kingdom3526 Posts
June 17 2017 01:29 GMT
#113
Man, i have a degree in maths with a focus on pure

I *still* have no idea what's going on most of the time, inc in this thread lmao
Amanebak
Profile Blog Joined December 2010
Czech Republic522 Posts
June 17 2017 07:45 GMT
#114
On June 17 2017 07:05 Simberto wrote:
Show nested quote +
On June 17 2017 06:00 Amanebak wrote:
On June 17 2017 05:42 Simberto wrote:
On June 17 2017 04:53 Amanebak wrote:
Hey.
I stumbled across a problem like this:

What is the longest gondola that can take a right-angle turn of a Venetian canal? The width of the canal is 2, respectively 3 length units before, resp. after the turn.

I apologize for my English.


Unless i missed something, the result is 5*sqrt(2).

The gondola needs to be able fit into the diagonal of the (2+3)*(2+3) square, which has a length of 5 sqrt (2)

At that point, 2sqrt(2) of the gondola is in the thinner canal, and 3sqrt(2) is in the thicker canal. It is obvious that no longer gondola could reach as far into the 3m canal if you draw a picture of the situation, and the 5sqrt(2) gondola can continue onwards from this point on.

Thank you for your reply.

If I understand it correctly, gondola turned 45 degrees and touches sides of the canal at both ends and touches the 'inner' edge of the turning with its side. That is the diagonal of the (2+3)*(2+3) square. Yes, it can go on, but I don't think it could go back, unless it bends. To imagine, I propose to make the difference of widths greater, like 1 before turn and 100 after.


Hm, i calculated it another way, and got a better result:

Just take a look at any rectangle which touch the corner of the canal. Before (and after) the turn, they all have the lengths (2+x) and (3+y), where 2/y = x/3 (intercept theorem). Thus, we are looking at the diagonal of a rectangle with sides (2+x) and (3+6/x), and especially for the minimum of those diagonals.

The diagonal has the length of

f(x) = Sqrt((2+x)²+(3+6/x)²)
and thus the derivative of:
f'(x) = 1/2f(x) * (2*(2+x)- (12/x²)*(3+6/x)
Which you would now need to find the zeroes of. (I had mathematica do it because i am lazy, the zero is apparently at (18)^(1/3). (And further checks will almost certainly prove it to be a minimum
That means that the lowest possible length of the gondola is f( (18)^(1/3)), which you can simplify to Sqrt (13 + 6*18^(1/3) + 3* 18^(2/3)), which is about 7.02, and indeed slightly less than 5Sqrt(2). Sorry for that.

Good job!

There is another way, instead of using intercept theorem. You consider diagonals that touch the edge with their sides and finds the minimal one, using \alpha -- angle between the latter direction of the canal and the diagonal.
We want to minimize function

l = l_1+l_2 = 3/sin(\alpha) +2/cos(\alpha)

I got something like \alpha_min = \arctan \sqrt[3](3/2),
which is interesting to me. If we generalize this a bit, we take a, resp. b as parameters, instead of 2, resp. 3 and think of symmetries of this problem, we conclude

\alpha_min (a,b)=\pi/2-\alpha_min (b,a),

which demonstrates that

\arctan(x)+\argtan (1/x) = \pi/2,

if I am not mistaken.
BW
Kadungon
Profile Joined June 2017
41 Posts
Last Edited: 2017-06-17 11:33:04
June 17 2017 11:28 GMT
#115
On June 12 2017 02:45 CecilSunkure wrote:
So I've spent a day studying Fourier Transform. So far the math is very understandable, at least on how to apply it. Understanding why it works and specifically what it does is more challenging. Most resources on the subject are just absolutely awful, and I may have to go out and buy and old text book to get good information.

It seems like FFT implementations popped up around the 80s-90s, and nobody ever really looked at them again in depth. Since then everyone takes and old implementation and wraps it. Well there's FFTW, but that library is a software engineering nightmare. It's a horribly obfuscated and heavyweight solution for a particularly small function. But what can you expect from a bunch of academics.


You need to tread FFTW3 as a black box, because that is what it is supposed to be. It is used by Matlab and free to use for academics. So it is an industry standard.



The real challenge is to be able to derive all the math and understand it in all its correctness. Only this way can I write a good implementation.


Well, this is just not true. You implement it as a black box. There is no point understanding what is inside, as you are just implementing it. If you want to improve it or change it, then you need to know what is inside the box.

BTW, when I did some FFTW stuff and I wanted to test correctness, I got into difficulties because defining PI with 12 decimals, or even 30, wasn't accurate enough, and rounding would cause funky stuff, resulting in frequency bins that weren't supposed to fill up, to be filled, because of oscillations in how each sin or cos call was rounded each period.

On June 17 2017 10:29 BrTarolg wrote:
Man, i have a degree in maths with a focus on pure

I *still* have no idea what's going on most of the time, inc in this thread lmao


That experience I get all over again anew every 3 or 4 weeks. You talk to people or read some reference, and suddenly there exists a whole new field, with all it's own intricacies, that you never knew about, barely understand, and that you think you want to know more about. But that is just impossible. So you figure out some silly pragmatic workaround, accepting that you are just one person with finite time and finite talent.


CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
June 17 2017 16:50 GMT
#116
On June 17 2017 20:28 Kadungon wrote:
Well, this is just not true. You implement it as a black box. There is no point understanding what is inside, as you are just implementing it. If you want to improve it or change it, then you need to know what is inside the box.


But that's what I did. Improve and change it. Obviously not mathematically improve or change, just in terms of software engineering benefits.
travis
Profile Blog Joined May 2003
United States23841 Posts
June 22 2017 19:15 GMT
#117
Here's a math question I have.

i want to write a sum:

from i=1 to n of: 1/2*(i-1)i

But I don't actually want i to stop when i = n. I want i to stop when the sum of "i values" has reached n.
How do I do that?

It's like if I could write my sum as "from i = i +1 to n"

Example:

If n = 10
I want my sum to go through i values of: 1, 2, 3, 4 - then STOP.
Which gives me a sum of 0+1+3+6 = 10


Is the only way to do this to solve for the relationship between what I want i to do, and n?
Because I am not sure what the relationship is.
Team Liquid
esla_sol
Profile Blog Joined September 2008
United States745 Posts
June 22 2017 20:42 GMT
#118
i teach elementary school and we do probability. things like dice and spinners. basic stuff. was talking to a friend about probability and he gave me this problem. i've been unable to make sense of it. any help is appreciated.


You and I are playing a game. We each shout out a number 1-100 every 5 seconds. Once someone says a number, that person can't say it again. What's the probability we match at least once?
HKTPZ
Profile Joined May 2017
83 Posts
Last Edited: 2017-06-22 21:01:23
June 22 2017 20:59 GMT
#119
f(x)=(1/6)(x-1)x(x+1)=(-x+x^3)/6

f(x) being the sum of (-i+i^2)/2, from i to x

Is that what you are looking for?

@travis
travis
Profile Blog Joined May 2003
United States23841 Posts
June 22 2017 21:24 GMT
#120
yeah I think it is
can I ask how you got it?
Team Liquid
Prev 1 4 5 6 7 8 32 Next All
Please log in or register to reply.
Live Events Refresh
Ultimate Battle
11:00
Solo Battle
Stork vs EffOrt
UltimateBattle 4276
LiquipediaDiscussion
Challenger's Cup
10:00
Quarterfinals
MaNa vs Zoun
Kozan
intothetv
LiquipediaDiscussion
Online Event
10:00
Sea Duckling Open #95
CranKy Ducklings29
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
DeMusliM 693
RotterdaM 687
Harstem 619
Rex 154
DIMAGA 126
JimRising 100
Dragon 0
StarCraft: Brood War
Britney 44782
GuemChi 8079
Calm 1247
Shuttle 1088
firebathero 1073
ToSsGirL 832
Horang2 742
EffOrt 559
ZerO 465
Stork 344
[ Show more ]
Light 332
BeSt 294
Mini 213
Zeus 170
Sharp 101
Snow 85
Soma 85
Aegong 77
actioN 77
ZerO(Twitch) 63
Soulkey 63
BeSt(Twitch) 58
Rush 54
hero 40
Free 28
NaDa 24
hero(twitch) 15
Heroes of the Storm
crisheroes686
Super Smash Bros
Liquid`Ken88
Other Games
Liquid`RaSZi3668
Lowko670
nookyyy 570
Liquid`Crank 493
OGKoka 316
Hui .163
BRAT_OK49
AxAlicia14
QueenE2
Organizations
StarCraft 2
ESL.tv1697
OGamingTV SC2 609
SC2 Vod Archives74
Blizzard YouTube
Counter-Strike: Global Offensive
ESL CS:GO0
[ Show 18 non-featured ]
StarCraft 2
• ZERG-TV 20
• ReiGnFenix 10
• GrantStarcraft 7
• D4rkn0ob1k 7
• PlayArcher 4
• nightgamer69 2
• hirohiro 1
• Tree_Stump
• IndyKCrew
• Alpha X_
• LaughNgamez Trovo
• Laughngamez YouTube
• Matiz_pl
• Genesis Gaming
• aXEnki
• AlphaB_SC2
SC2: Legacy of the Void
• KarlJayG
StarCraft: Brood War
• AfreecaTV YouTube
Upcoming Events
ESL Pro Tour
56m
Epic.LAN
2h 56m
BSL
4h 26m
TerrOr vs UltrA
BoA vs vOddy
Gosudark vs MadiNho
spx vs OctZerg
Alpha Pro Series
6h 56m
AqueroN vs Rodzyn
SortOf vs BattleB
Best of the Best Tour
8h 56m
vOddy vs Sziky
StRyKeR vs trutaCz
PSISTORM Gaming Misc
11h 56m
Rogue City Rumble
11h 56m
The NA Apprentice
12h 56m
PSISTORM Gaming Misc
13h 56m
Alpha X Series
15h 56m
Ryung vs Rex
Zoun vs Nice
[ Show More ]
Grand Platypus Open
18h 56m
Afreeca Challengers Sta…
20h 56m
Epic.LAN
20h 56m
Challenger's Cup
20h 56m
OSC
21h 56m
ESL Pro Tour
1d
PSISTORM Gaming Misc
1d 1h
BeAsT Cup
1d 3h
BSL
1d 4h
Avi-Love vs StRyKeR
KwarK vs Cross
Sziky vs Ziggy
g0rynich vs Dandy
Alpha X Junior Champion…
1d 4h
Best of the Best Tour
1d 8h
DragOn vs StRyKeR
kogeT vs TerrOr
Dewalt vs OyAji
AfreecaTV Starcraft Tea…
1d 18h
Afreeca Challengers Sta…
1d 20h
Epic.LAN
1d 20h
ITaX Trovo Weekly
1d 20h
Solar vs Hurricane
SpeCial vs DongRaeGu
ESL Pro Tour
2 days
Korea Lite Cup
2 days
BSL
2 days
trutaCz vs Tech
Michael vs SneazeL
Casper vs Yugox
Hawk vs DragOn
BSL
2 days
Alpha Pro Series
2 days
Starkiller vs Garitos
The Pizza Pie
2 days
OlimoLeague
3 days
IntoTheAlphaX Pro Circuit
4 days
Trap vs TY
INnoVation vs Zest
KCM Race Survival
4 days
The NA Apprentice
5 days
PSISTORM Gaming Misc
5 days
OSC
6 days
KCM Ladies Race Survival
6 days
Liquipedia Results

Completed

Ultimate Battle: Rush vs Stork
WardiTV 2021
Rive: Love HotS
BLAST Premier Spring Groups

Ongoing

Best of the Best Tour
KCM Race Survival 2021 Season 1
Bombastic StarLeague 11
Rogue City Rumble
Shinhan Tank Proleague S4
BWCL Season 52
BWCL Season 52: Div-A
ASTL Season 2
Ultimate Battle: Stork vs EffOrt
IEM Katowice 2021
NGS Storm Division S2
30k/CM Off-S. Tour
ESEA S36 - NA Premier
ESEA S36 - EU Premier
ESEA S36 - AU Premier
Snow Sweet Snow #2
IEM Katowice 2021

Upcoming

BW Jeez Weekly 104
BW Jeez Weekly 103
BW Jeez Weekly 102
King of Kings 52
2021 ACS Season 1
BW Jeez Weekly 101
Deathfate Pro League
DH Masters Summer: Finals
StayAtHome Story Cup #3
DHM Summer: China
DHM Summer: NA
DHM Summer: Oceania
DHM Summer: Asia
DHM Summer: LatAm
DHM Summer: Europe
2021 GSL Season 1
Masters Clash Champ. 2021
IEM Summer 2021
DH Masters Spring 2021
BLAST Premier Spring Showd.
DreamHack Open Mar 2021
ESL Pro League Season 13
Pinnacle Cup
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2021 TLnet. All Rights Reserved.