• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 13:37
CET 19:37
KST 03:37
  • 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
Behind the Blue - Team Liquid History Book15Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8herO wins SC2 All-Star Invitational14
Community News
ACS replaced by "ASL Season Open" - Starts 21/0220LiuLi Cup: 2025 Grand Finals (Feb 10-16)25Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2Nexon's StarCraft game could be FPS, led by UMS maker10PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar)13
StarCraft 2
General
How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Nexon's StarCraft game could be FPS, led by UMS maker Terran Scanner Sweep Behind the Blue - Team Liquid History Book Weekly Cups (Jan 12-18): herO, MaxPax, Solar win
Tourneys
LiuLi Cup: 2025 Grand Finals (Feb 10-16) RSL Season 4 announced for March-April PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) RSL Revival: Season 4 Korea Qualifier (Feb 14) Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
Map Editor closed ? [A] Starcraft Sound Mod
External Content
The PondCast: SC2 News & Results Mutation # 512 Overclocked Mutation # 511 Temple of Rebirth Mutation # 510 Safety Violation
Brood War
General
ACS replaced by "ASL Season Open" - Starts 21/02 Which units you wish saw more use in the game? StarCraft player reflex TE scores [ASL21] Potential Map Candidates Gypsy to Korea
Tourneys
[Megathread] Daily Proleagues Escore Tournament StarCraft Season 1 Small VOD Thread 2.0 KCM Race Survival 2026 Season 1
Strategy
Fighting Spirit mining rates Zealot bombing is no longer popular? Simple Questions, Simple Answers Current Meta
Other Games
General Games
Nintendo Switch Thread Path of Exile Diablo 2 thread Battle Aces/David Kim RTS Megathread ZeroSpace Megathread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia
Community
General
US Politics Mega-thread Ask and answer stupid questions here! European Politico-economics QA Mega-thread The Games Industry And ATVI Russo-Ukrainian War Thread
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
ADHD And Gaming Addiction…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1798 users

The Big Programming Thread - Page 848

Forum Index > General Forum
Post a Reply
Prev 1 846 847 848 849 850 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
emperorchampion
Profile Blog Joined December 2008
Canada9496 Posts
February 18 2017 22:22 GMT
#16941
On February 19 2017 06:52 tofucake wrote:
Show nested quote +
On February 19 2017 05:30 spinesheath wrote:
Gee why do I keep using quote instead of edit...

It gets even more annoying when you can edit any post...

Trying to excuse future mod abuse eh? :p
TRUEESPORTS || your days as a respected member of team liquid are over
Hanh
Profile Joined June 2016
146 Posts
February 19 2017 00:23 GMT
#16942
On February 19 2017 04:56 Acrofales wrote:
Show nested quote +
On February 18 2017 18:11 Hanh wrote:
Look at the variables.


there exists x, such that for all y

and

for all y, there exists x


They are flipped in the second statement.

For any predicate P(x, y) for which,

If [there is a x for which for all y, P(x, y) is true] then [for all y, there is a x for which P(x, y) is true].

In the first case x cannot depend on y. In the second case it can.






Okay, I see it now. So for starters, and this is more at travis than at you: quantified variables are quantified variables. For all I cared, you could use "cupcake" as your variable name. If the order of your variables are important, make it explicit.

But either way, the claim is still wrong. For the sake of simplicity, I have written it out here:

(1) \exists x \forall y P(x, y)
is stronger than
(2) \forall x \exists y P(y, x)

This is also not true. All we need to do is find a P and a model m such that m \models (1), but m \not\models (2). Right.

Or if you prefer it in your form of implication (2) \rightarrow (1) is false if (1) is false while (2) ist true (which boils down to essentially the same thing, but is less formal.

Here's a simple counter example:

Let X = {a, b} and Y = {a}
R = {(a, a)}

Now:
\forall x \in X \exists y \in Y such that (y, x) \in R

This is false. Counter example: x=b

However:
\exists x \in X \forall y \in Y such that (x, y) \in R
This is true, because it is true for x=a.

Therefore, unless you also make some requirements of the domains of your variables and probably some properties of P, this is definitely not true.

There is an interesting relationship between the two statements. I'm not sure whether your lemma might be true if we restrict x and y to be from the same set. I didn't immediately see a counterexample (but also haven't looked very hard, or tried to construct a proof).

But the sweeping statement you made is still false even when you clarify the switched variables.

+ Show Spoiler +
Thankfully. Would be rather embarrassing for me to be wrong on something like this


It seems to me that you are grasping at straws in order to be right. So, ok - fine you are right.

For the record, the discussion thread that you seemed to have missed was about the order of the quantifiers. Travis didn't see why they matter. In context, the domains of x and y are set, so your counter example doesn't apply. Why can't you admit that you didn't notice that and just move on.

Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
February 19 2017 07:24 GMT
#16943
--- Nuked ---
meatpudding
Profile Joined March 2011
Australia520 Posts
February 19 2017 07:51 GMT
#16944
On February 19 2017 03:50 travis wrote:
Anyone want to tell me what they think of this C code? I feel like it's pretty well written. To the point. Normally I end up making these small exercises way more convoluted than they need to be. (inb4 i find out it's shit)

the specifications are to take the prototype and implement the function. the function takes the source string and copies it to the results string with leading and trailing whitespace removed. it then records how many spaces were removed into number_of_spaces. You return -1 if there was nothing to copy over.

code:

+ Show Spoiler +


int remove_spaces(const char *source, char *result, int *num_spaces_removed) {
int i = 0;
int j = strlen(source) - 1;
int k = 0;
int z = 0;

if(source == NULL || j == -1) {
return -1;
}


while(source[i] {
if(source[i] == ' ') {
i++;
continue;
}
break;
}


while(1) {
if(source[j] == ' ') {
j--;
continue;
}
break;
}

for(k=i; k < (j+1); k++) {
printf("%d %d\n", k, j);
result[z] = source[k];
z++;
}

result[z] = '\0';

*num_spaces_removed = (strlen(source) - strlen(result));


return 0;
}




In the j-- loop there is no checks for j < 0. You could use a for loop like
for (j; j > 0; j--)
just in case the string is all whitespace.

Instead of the k loop, I would look into using memcpy. It's cleaner than having to loop every char, and it's a good exercise for understanding pointers.

Be excellent to each other.
Acrofales
Profile Joined August 2010
Spain18215 Posts
February 19 2017 08:48 GMT
#16945
On February 19 2017 09:23 Hanh wrote:
Show nested quote +
On February 19 2017 04:56 Acrofales wrote:
On February 18 2017 18:11 Hanh wrote:
Look at the variables.


there exists x, such that for all y

and

for all y, there exists x


They are flipped in the second statement.

For any predicate P(x, y) for which,

If [there is a x for which for all y, P(x, y) is true] then [for all y, there is a x for which P(x, y) is true].

In the first case x cannot depend on y. In the second case it can.






Okay, I see it now. So for starters, and this is more at travis than at you: quantified variables are quantified variables. For all I cared, you could use "cupcake" as your variable name. If the order of your variables are important, make it explicit.

But either way, the claim is still wrong. For the sake of simplicity, I have written it out here:

(1) \exists x \forall y P(x, y)
is stronger than
(2) \forall x \exists y P(y, x)

This is also not true. All we need to do is find a P and a model m such that m \models (1), but m \not\models (2). Right.

Or if you prefer it in your form of implication (2) \rightarrow (1) is false if (1) is false while (2) ist true (which boils down to essentially the same thing, but is less formal.

Here's a simple counter example:

Let X = {a, b} and Y = {a}
R = {(a, a)}

Now:
\forall x \in X \exists y \in Y such that (y, x) \in R

This is false. Counter example: x=b

However:
\exists x \in X \forall y \in Y such that (x, y) \in R
This is true, because it is true for x=a.

Therefore, unless you also make some requirements of the domains of your variables and probably some properties of P, this is definitely not true.

There is an interesting relationship between the two statements. I'm not sure whether your lemma might be true if we restrict x and y to be from the same set. I didn't immediately see a counterexample (but also haven't looked very hard, or tried to construct a proof).

But the sweeping statement you made is still false even when you clarify the switched variables.

+ Show Spoiler +
Thankfully. Would be rather embarrassing for me to be wrong on something like this


It seems to me that you are grasping at straws in order to be right. So, ok - fine you are right.

For the record, the discussion thread that you seemed to have missed was about the order of the quantifiers. Travis didn't see why they matter. In context, the domains of x and y are set, so your counter example doesn't apply. Why can't you admit that you didn't notice that and just move on.


Not really, because the context changed when he said "for a predicate P". But even if we look at asymmetric order, they are simply not comparable. I don't know how many different ways I have to say it: flipping the quantifiers is simply saying something different about your world, and unless you impose some very narrow conditions on your world, you cannot ever say that one is stronger than the other.

And even if we go with the original statement, there simply is no stronger relationship between the two predicates (although it took me a while to realize where the error in thought was).

For all x exists y x < y
Exists x for all y y < x

The latter says something about a global maximum, but we have to finagle with the definition of our domain. Either x\in D and y \in D - {x}, or you have a problem: let y=x, and the second predicate is false even if the set has a global maximum.

However, the former says nothing about maxima, it simply says something about seriality (in fact, that is the very definition of seriality). However, seriality of < is particularly not true if there is a maximum in your set. And there isn't much you can do about it, because the same trick we just applied doesn't work:

For all x in D there is a y in D - {x} such that x < y

Counter example let x be the maximum of the set.

So no. Even then, you are simply making two different statements about your sets and your relation. Now if you say that he really meant that the domains are numeric and equal, then the latter statement is always trivially false: if there is a global maximum, pick it as y for your counter example. If there is no global maximum then there simply is no x for which it might ever hold. So it is trivially false. Given that under these strict conditions, the former statement is sometimes true, your latter statement is indeed stronger, but it's trivial, because False is always the strongest statement, but I assumed we weren't talking about trivial cases...

Hanh
Profile Joined June 2016
146 Posts
Last Edited: 2017-02-19 11:15:17
February 19 2017 10:34 GMT
#16946
Once again, there is a context.


the order matters?

I thought I remembered the professor saying the order matters for this, but when I conceptualized it I couldn't see the difference between

there exists x, such that for all y

and

for all y, there exists x


travis didn't put the complete statement, but I'm sure he meant this:

(1) exists x in X, for all y in Y, P(x, y)
(2) for all y in Y, exists x in X, P(x, y)

because he said: "the order matters?"

And I said: (1) => (2)

If you don't agree with that and you think that x and y are unbound then the discussion is moot.
By changing the domain, statements change meaning. It's true for any logical statement with quantifiers. You don't have to go very far to see that.

P: for all x in X, x = 0.
False if X = {0, 1}, True if X = {0}.

Essentially, statements without a domain are meaningless.

Btw, it's a classic question. I could google an answer here:

http://math.stackexchange.com/questions/1064889/the-order-of-mixed-quantifiers


For all x exists y x < y
Exists x for all y y < x

The latter says something about a global maximum, but we have to finagle with the definition of our domain. Either x\in D and y \in D - {x}, or you have a problem: let y=x, and the second predicate is false even if the set has a global maximum.

Well, as you said, you have to change the domain.

IMO, the context made clear that x was bound to X, and y to Y.

then
exists x in R, for all y in R, x < y: means there is a real number lower than every other real number. Which is false.

for all y in R, exists x in R, x < y: every real number has a number lower than it.
which is true.
Hanh
Profile Joined June 2016
146 Posts
Last Edited: 2017-02-19 12:52:04
February 19 2017 11:58 GMT
#16947
On February 19 2017 03:50 travis wrote:
Anyone want to tell me what they think of this C code? I feel like it's pretty well written. To the point. Normally I end up making these small exercises way more convoluted than they need to be. (inb4 i find out it's shit)

the specifications are to take the prototype and implement the function. the function takes the source string and copies it to the results string with leading and trailing whitespace removed. it then records how many spaces were removed into number_of_spaces. You return -1 if there was nothing to copy over.


In addition to what other people have commented before, I think that the prototype of the function isn't a good one. It's not something that you can always control but in case it is your choice, there are a few abnomalities


int remove_spaces(const char *source, char *result, int *num_spaces_removed)


1. What size was result allocated with? Am I going to do a buffer overrun by copying from source? I don't know.
2. Why isn't the length of source passed in? If the caller has it already, this would save a strlen.
3. Why optimize for the empty string case? Is it really important for remove_spaces to handle that?
4. Returning -1 could be unexpected by the caller and result in a bug because the semantics of remove_spaces were overly complex. If the caller wants to check, it could just look at *result == 0

If instead we had,

size_t remove_spaces(const char *source, size_t n, char *result)


Or even better if you allow for SAL annotations (or something similar)


size_t remove_spaces(_In_reads_bytes_(n+1) const char *source, size_t n, _Out_writes_bytes_(n+1) char *result)

Your compiler could check for buffer overreads and overwrites.

Then your code could also get easier.

(Untested, I hope it's not completely wrong).


size_t remove_spaces(_In_reads_bytes_(n+1) const char *source, size_t n, _Out_writes_bytes_(n+1) char *result) {
ssize_t start = 0, end = n - 1;
for (; start < n && source[start] == ' '; start++) ;
for (; end >= start && source[end] == ' '; end--) ;
size_t length = end - start + 1;
strncpy(result, source + start, length);
return length;
}


I'm returning the new length, instead of the number of spaces removed. The new length is more interesting to have because it is a property of the new string. If the caller wants to have the number of spaces removed, he can subtract the new length from the old one.

Acrofales
Profile Joined August 2010
Spain18215 Posts
Last Edited: 2017-02-20 11:50:57
February 20 2017 11:47 GMT
#16948
On February 19 2017 19:34 Hanh wrote:
Once again, there is a context.

Show nested quote +

the order matters?

I thought I remembered the professor saying the order matters for this, but when I conceptualized it I couldn't see the difference between

there exists x, such that for all y

and

for all y, there exists x


travis didn't put the complete statement, but I'm sure he meant this:

(1) exists x in X, for all y in Y, P(x, y)
(2) for all y in Y, exists x in X, P(x, y)

because he said: "the order matters?"

And I said: (1) => (2)

If you don't agree with that and you think that x and y are unbound then the discussion is moot.
By changing the domain, statements change meaning. It's true for any logical statement with quantifiers. You don't have to go very far to see that.

P: for all x in X, x = 0.
False if X = {0, 1}, True if X = {0}.

Essentially, statements without a domain are meaningless.

Btw, it's a classic question. I could google an answer here:

http://math.stackexchange.com/questions/1064889/the-order-of-mixed-quantifiers

Show nested quote +

For all x exists y x < y
Exists x for all y y < x

The latter says something about a global maximum, but we have to finagle with the definition of our domain. Either x\in D and y \in D - {x}, or you have a problem: let y=x, and the second predicate is false even if the set has a global maximum.

Well, as you said, you have to change the domain.

IMO, the context made clear that x was bound to X, and y to Y.

then
exists x in R, for all y in R, x < y: means there is a real number lower than every other real number. Which is false.

for all y in R, exists x in R, x < y: every real number has a number lower than it.
which is true.


I had written a long reply that was going point by point, but I realized that the main issue is that we are simply using different levels of mathematical rigour, which is causing a misunderstanding... in particular to other people who might be interested in reading this (very few by now, I'd assume ).

So lets clarify. As long as x and y are in the same domain the implication holds. In other words:

\exists x \forall y P(x,y) \rightarrow \forall y \exists x P(x,y)

holds as long as x, y \in D (which is an underlying assumption for the stackexchange article if you actually follow the proof). If x, y in different sets (x \in X and y \in Y), then you need restrictions on X and Y (and/or properties of P), and it can no longer be said to hold in the general case.

Given that Travis was talking about x,y in the same subset of R, it holds (there is never a universal maximum that is also greater than itself, and thus it is trivially true).
Manit0u
Profile Blog Joined August 2004
Poland17661 Posts
February 20 2017 13:33 GMT
#16949
So, 3 month at new work now. Starting to feel comfortable with RoR. Then I get thrown into a new project where I have to deal with stuff like this (implementing it in Ruby):

https://github.com/LuaDist/lcms/blob/master/include/icc34.h
Time is precious. Waste it wisely.
Acrofales
Profile Joined August 2010
Spain18215 Posts
February 20 2017 13:39 GMT
#16950
On February 20 2017 22:33 Manit0u wrote:
So, 3 month at new work now. Starting to feel comfortable with RoR. Then I get thrown into a new project where I have to deal with stuff like this (implementing it in Ruby):

https://github.com/LuaDist/lcms/blob/master/include/icc34.h

That seems fairly straightforward? Just a bunch of structs getting defined in a header? Did you link the wrong thing? There doesn't seem to be anything particularly complex there, just a load of work. I admit, I didn't read it very carefully, and I know you're just venting here and not asking for help or advice, but can you explain what the problem is that you have to deal with?
Manit0u
Profile Blog Joined August 2004
Poland17661 Posts
February 20 2017 13:45 GMT
#16951
On February 20 2017 22:39 Acrofales wrote:
Show nested quote +
On February 20 2017 22:33 Manit0u wrote:
So, 3 month at new work now. Starting to feel comfortable with RoR. Then I get thrown into a new project where I have to deal with stuff like this (implementing it in Ruby):

https://github.com/LuaDist/lcms/blob/master/include/icc34.h

That seems fairly straightforward? Just a bunch of structs getting defined in a header? Did you link the wrong thing? There doesn't seem to be anything particularly complex there, just a load of work. I admit, I didn't read it very carefully, and I know you're just venting here and not asking for help or advice, but can you explain what the problem is that you have to deal with?


http://www.color.org/icc-book1.PDF

That's just a small part of what I'm dealing with now. Basically, I have to build a system from ground-up. It'll be an application residing on the server cluster, mapping resources to the database, keeping them synced and serving them to other applications that reside on numerous other clusters and process said resources...

It would all be cool and dandy, if not for the fact that the guy leading this project needs it to be done in Rails (3), but he hates Rails so framework conventions are out the window. He also doesn't agree with the current best practices in Ruby so that's out the window too...

I can't even write proper tests because with the current architectural implementation the framework's test suite can't be launched at all (have to run tests on each file manually) etc. etc.

I'm in some deep shit and in addition I have to learn all about printer operation and such, which is boring as hell and will take forever.

Thankfully I have my other project in Rails 5 with best practices enforced all around. It's the one thing that's keeping me sane right now.
Time is precious. Waste it wisely.
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
Last Edited: 2017-02-20 15:56:25
February 20 2017 15:55 GMT
#16952
On February 20 2017 22:45 Manit0u wrote:
It would all be cool and dandy, if not for the fact that the guy leading this project needs it to be done in Rails (3), but he hates Rails so framework conventions are out the window. He also doesn't agree with the current best practices in Ruby so that's out the window too...


How do people handle stuff like this? People who do everything their own way are really hard to work with.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Acrofales
Profile Joined August 2010
Spain18215 Posts
February 20 2017 16:17 GMT
#16953
On February 20 2017 22:45 Manit0u wrote:
Show nested quote +
On February 20 2017 22:39 Acrofales wrote:
On February 20 2017 22:33 Manit0u wrote:
So, 3 month at new work now. Starting to feel comfortable with RoR. Then I get thrown into a new project where I have to deal with stuff like this (implementing it in Ruby):

https://github.com/LuaDist/lcms/blob/master/include/icc34.h

That seems fairly straightforward? Just a bunch of structs getting defined in a header? Did you link the wrong thing? There doesn't seem to be anything particularly complex there, just a load of work. I admit, I didn't read it very carefully, and I know you're just venting here and not asking for help or advice, but can you explain what the problem is that you have to deal with?


http://www.color.org/icc-book1.PDF

That's just a small part of what I'm dealing with now. Basically, I have to build a system from ground-up. It'll be an application residing on the server cluster, mapping resources to the database, keeping them synced and serving them to other applications that reside on numerous other clusters and process said resources...

It would all be cool and dandy, if not for the fact that the guy leading this project needs it to be done in Rails (3), but he hates Rails so framework conventions are out the window. He also doesn't agree with the current best practices in Ruby so that's out the window too...

I can't even write proper tests because with the current architectural implementation the framework's test suite can't be launched at all (have to run tests on each file manually) etc. etc.

I'm in some deep shit and in addition I have to learn all about printer operation and such, which is boring as hell and will take forever.

Thankfully I have my other project in Rails 5 with best practices enforced all around. It's the one thing that's keeping me sane right now.


That book looks mindnumbingly boring. I hope the blurb at the front is written tongue-in-cheek. Or perhaps I am missing something and international color codes are actually fascinating (I guess everything *can* be interesting). Anyway, I guess all I can say is that I sympathize and good luck.

The way I would deal with a job where my boss tells me what to do but also tells me that I can't use any of the tools to do it, is just use the tools anyway, and then when it's done and he asks what I used, I tell him frankly that I used all the tools he told me I wasn't allowed to use.

Of course, this only works if you have the freedom of a boss who doesn't micromanage. If your boss does micromanage your tasks, then I guess you're screwed and have to comply (or quit).
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2017-02-20 20:15:32
February 20 2017 20:10 GMT
#16954
alright, moving on to more discrete math stuff. I really need help with these problems :/

Yes, this is homework help. No, I am not a sack of shit, I am only asking because I am trying to learn more. No one gets through college by cheating on homework anyways since like 80% of your grades are exams.

First question series is titled "math of interest" and has 7 parts but I will only list a couple of them, and maybe it will give me a better idea on how to do the rest.

+ Show Spoiler +

the domain for the following problems are N. You can have +,-,x,/,= and (for all, there exists, epsilon (what would you call this one, "in" ?) and (and, or, not)

1.) write a formula ONE(x) such that ONE(x) holds iff when x is divided by 4 the remainder is 1:

So my first question is wtf is ONE(x). Is this a function, or is this a formula? It says write a formula. Is an answer literally x=1(mod 4)? But it doesn't say we can use mod so then it wants something like "(x-1)/4 = y where y is in N?"


2.) write a formula PRIME(x) such that PRIME(x) holds iff x is Prime:

so, just throwing out an idea

for all x in N, for all y in n, [(x does not equal y) and (x/y is not in N)



different type of problem here

+ Show Spoiler +

if x is congruent to 2 (mod 7) and y is congruent to 3 (mod 14) then what can you say about xy?

WTF DO THEY WANT. I do not know anything interesting you can say about xy. I expect it has to do with some rule that I don't know. I looked through the text and can't find anything.


last one:

+ Show Spoiler +

show that if n^3 is congruent to 0 (mod 7) then n is congruent to 0 (mod 7):

I do not know how to prove this. I mean it seems obvious this is true to me.. I just have no idea how to prove it :/

spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
February 20 2017 20:17 GMT
#16955
On February 21 2017 05:10 travis wrote:
if x is congruent to 2 (mod 7) and y is congruent to 3 (mod 14) then what can you say about xy?

WTF DO THEY WANT. I do not know anything interesting you can say about xy. I expect it has to do with some rule that I don't know. I looked through the text and can't find anything.

They want the a and b in "xy is congruent to a (mod b)". Now this has been years ago and I have no idea anymore how it works.
If you have a good reason to disagree with the above, please tell me. Thank you.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
February 20 2017 20:32 GMT
#16956
On February 21 2017 05:17 spinesheath wrote:
Show nested quote +
On February 21 2017 05:10 travis wrote:
if x is congruent to 2 (mod 7) and y is congruent to 3 (mod 14) then what can you say about xy?

WTF DO THEY WANT. I do not know anything interesting you can say about xy. I expect it has to do with some rule that I don't know. I looked through the text and can't find anything.

They want the a and b in "xy is congruent to a (mod b)". Now this has been years ago and I have no idea anymore how it works.


kinda just doin some random stuff
I think that "xy is congruent to 6 (mod 7)" might be what they want then?
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
February 20 2017 21:06 GMT
#16957
for my last one, does this work for a proof?

do the contrapositive:

if n is not congruent to 0 (mod 7) then n^3 is not congruent to 0 (mod 7)

then just do the cases where n = 1, n = 2, n = 3, n = 4, n = 5, n = 6
proving that the contrapositive holds true for each of these cases?
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
February 20 2017 21:29 GMT
#16958
On February 21 2017 05:32 travis wrote:
Show nested quote +
On February 21 2017 05:17 spinesheath wrote:
On February 21 2017 05:10 travis wrote:
if x is congruent to 2 (mod 7) and y is congruent to 3 (mod 14) then what can you say about xy?

WTF DO THEY WANT. I do not know anything interesting you can say about xy. I expect it has to do with some rule that I don't know. I looked through the text and can't find anything.

They want the a and b in "xy is congruent to a (mod b)". Now this has been years ago and I have no idea anymore how it works.


kinda just doin some random stuff
I think that "xy is congruent to 6 (mod 7)" might be what they want then?


Sure.

x === 2 (mod 7)
y === 3 (mod 14)

7*a = x - 2
x = 7*a + 2
14*b = y - 3
y = 14*b + 3

xy = (7*a + 2)(14*b + 3)
xy = 98ab + 21a + 28b + 6
xy - 6 = 98ab + 21a + 28b
xy - 6 = 7(14ab + 3a + 4b)
xy === 6 (mod 7)
There is no one like you in the universe.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
February 20 2017 21:42 GMT
#16959
On February 21 2017 06:29 Blisse wrote:

xy - 6 = 7(14ab + 3a + 4b)
xy === 6 (mod 7)


I think I understand what you did here, but I think it would be helpful if you could explain it to me
Manit0u
Profile Blog Joined August 2004
Poland17661 Posts
February 20 2017 22:26 GMT
#16960
On February 21 2017 00:55 Blitzkrieg0 wrote:
Show nested quote +
On February 20 2017 22:45 Manit0u wrote:
It would all be cool and dandy, if not for the fact that the guy leading this project needs it to be done in Rails (3), but he hates Rails so framework conventions are out the window. He also doesn't agree with the current best practices in Ruby so that's out the window too...


How do people handle stuff like this? People who do everything their own way are really hard to work with.


I really don't know. This guy has 6 years of experience more than me (in some really big projects too) so I'm not really in a position to dispute his methods. Why is he using Notepad++ and insists on using tabs instead of spaces is beyond me though...
Time is precious. Waste it wisely.
Prev 1 846 847 848 849 850 1032 Next
Please log in or register to reply.
Live Events Refresh
RSL Revival
18:00
S4 Europe Server Qualifier
IndyStarCraft 180
LiquipediaDiscussion
PSISTORM Gaming Misc
16:55
FSL TeamLeague S10: ASH vs POG
Freeedom24
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Grubby 4026
SteadfastSC 233
IndyStarCraft 143
BRAT_OK 89
ForJumy 44
Rex 28
EmSc Tv 15
StarCraft: Brood War
Calm 2211
Jaedong 727
firebathero 242
Hm[arnc] 31
Rock 25
910 23
yabsab 14
Shine 10
Dota 2
Fuzer 316
febbydoto10
Counter-Strike
fl0m4627
byalli1143
Dendi731
Super Smash Bros
Mew2King114
Heroes of the Storm
Khaldor829
Liquid`Hasu502
Trikslyr98
MindelVK21
Other Games
gofns24196
FrodaN4065
Mlord613
crisheroes266
ToD112
KnowMe95
Livibee51
Organizations
Counter-Strike
PGL22420
Other Games
EGCTV1352
gamesdonequick661
StarCraft 2
angryscii 16
EmSc Tv 15
EmSc2Tv 15
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• printf 44
• Shameless 17
• Airneanach12
• Migwel
• sooper7s
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• 80smullet 26
• blackmanpl 2
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• lizZardDota252
League of Legends
• Nemesis6161
• imaqtpie1293
• Shiphtur629
Upcoming Events
AI Arena Tournament
1h 24m
Replay Cast
5h 24m
Sparkling Tuna Cup
15h 24m
LiuLi Cup
16h 24m
Maru vs Reynor
Serral vs Rogue
Ladder Legends
23h 24m
Replay Cast
1d 5h
Replay Cast
1d 14h
Wardi Open
1d 17h
Monday Night Weeklies
1d 22h
OSC
2 days
[ Show More ]
WardiTV Winter Champion…
2 days
Replay Cast
3 days
WardiTV Winter Champion…
3 days
Replay Cast
4 days
PiG Sty Festival
4 days
The PondCast
4 days
KCM Race Survival
4 days
WardiTV Winter Champion…
4 days
Replay Cast
5 days
PiG Sty Festival
5 days
Epic.LAN
5 days
Replay Cast
6 days
PiG Sty Festival
6 days
CranKy Ducklings
6 days
Epic.LAN
6 days
Liquipedia Results

Completed

Escore Tournament S1: W8
Rongyi Cup S3
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
LiuLi Cup: 2025 Grand Finals
Nations Cup 2026
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025

Upcoming

Escore Tournament S1: King of Kings
[S:21] ASL SEASON OPEN 1st Round
[S:21] ASL SEASON OPEN 1st Round Qualifier
[S:21] ASL SEASON OPEN 2nd Round
[S:21] ASL SEASON OPEN 2nd Round Qualifier
Acropolis #4
IPSL Spring 2026
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
WardiTV Winter 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
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 © 2026 TLnet. All Rights Reserved.