• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 10:29
CET 16:29
KST 00:29
  • 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
TL.net Map Contest #21: Winners11Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation6Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
[TLMC] Fall/Winter 2025 Ladder Map Rotation Mech is the composition that needs teleportation t Weekly Cups (Nov 3-9): Clem Conquers in Canada Craziest Micro Moments Of All Time? SC: Evo Complete - Ranked Ladder OPEN ALPHA
Tourneys
Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Sparkling Tuna Cup - Weekly Open Tournament $5,000+ WardiTV 2025 Championship Merivale 8 Open - LAN - Stellar Fest
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
BW General Discussion FlaSh on: Biggest Problem With SnOw's Playstyle Terran 1:35 12 Gas Optimization BGH Auto Balance -> http://bghmmr.eu/ [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET [ASL20] Grand Finals [Megathread] Daily Proleagues
Strategy
Current Meta PvZ map balance How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
EVE Corporation Nintendo Switch Thread Stormgate/Frost Giant Megathread Should offensive tower rushing be viable in RTS games? Path of Exile
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 SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread The Games Industry And ATVI
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1235 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
Spain18114 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
Spain18114 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
Poland17429 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
Spain18114 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
Poland17429 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
Spain18114 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
Poland17429 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
OSC
11:30
Mid Season Playoffs
Krystianer vs PercivalLIVE!
WardiTV1063
TKL 199
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
TKL 199
SteadfastSC 109
Rex 91
StarCraft: Brood War
Calm 3367
Bisu 2918
Rain 2430
Hyuk 1473
Horang2 984
Flash 514
Soma 498
Stork 393
Rush 303
Soulkey 121
[ Show more ]
Backho 114
Barracks 58
sas.Sziky 46
hero 38
Aegong 27
zelot 22
sSak 21
Terrorterran 20
Rock 19
Killer 16
Dota 2
Gorgc3152
qojqva2018
Dendi1105
BananaSlamJamma123
XcaliburYe100
Other Games
hiko638
Sick526
DeMusliM442
Hui .346
Fuzer 199
Mew2King94
QueenE50
Organizations
StarCraft: Brood War
Kim Chul Min (afreeca) 9
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• poizon28 22
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• HerbMon 10
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 3021
• WagamamaTV453
League of Legends
• Nemesis4037
• TFBlade977
Upcoming Events
Tenacious Turtle Tussle
7h 31m
The PondCast
18h 31m
RSL Revival
18h 31m
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
20h 31m
WardiTV Korean Royale
20h 31m
PiGosaur Monday
1d 9h
RSL Revival
1d 18h
Classic vs Creator
Cure vs TriGGeR
Kung Fu Cup
1d 20h
CranKy Ducklings
2 days
RSL Revival
2 days
herO vs Gerald
ByuN vs SHIN
[ Show More ]
Kung Fu Cup
2 days
IPSL
3 days
ZZZero vs rasowy
Napoleon vs KameZerg
BSL 21
3 days
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
3 days
RSL Revival
3 days
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
3 days
WardiTV Korean Royale
3 days
BSL 21
4 days
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
4 days
Dewalt vs WolFix
eOnzErG vs Bonyth
Wardi Open
4 days
Monday Night Weeklies
5 days
WardiTV Korean Royale
5 days
The PondCast
6 days
Liquipedia Results

Completed

Proleague 2025-11-07
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
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 © 2025 TLnet. All Rights Reserved.