[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

/vt/ is now archived.Become a Patron!

/sci/ - Science & Math

View post   

[ Toggle deleted replies ]
File: 287 KB, 836x1065, IMG_2997.png [View same] [iqdb] [saucenao] [google] [report]
9399956 No.9399956 [Reply] [Original] [archived.moe]

Daily C"""S""" hate thread

>> No.9399978
File: 40 KB, 634x650, 214.jpg [View same] [iqdb] [saucenao] [google] [report]

>being this envious

>> No.9399982

Go back to optimizing your fizzbuzz program, you brainlet computer """"""""""scientist""""""""""

>> No.9400000

>Half of CS jobs go to people without CS degrees
>They do a better job than those with CS degrees

Enjoy your pink slip.

>> No.9400005
File: 99 KB, 561x595, 1502603445925.png [View same] [iqdb] [saucenao] [google] [report]

agreed, but i still gotta participate

>> No.9400014
File: 42 KB, 544x499, 1457469780563.jpg [View same] [iqdb] [saucenao] [google] [report]

Holy shit.
Anyway, memes aside, CS is pretty great. I started studying bioinformatics this summer and all the guys with CS backgrounds are pretty smart. Maybe it's a US phenomenon where CS students are absolute brainlets.

>> No.9400018
File: 52 KB, 1195x258, CS hatin v.png [View same] [iqdb] [saucenao] [google] [report]

The vast majority of CS majors don't actually play video games (it requires quick thinking). Also, Sisper ToC is 9th grade level material and not impressive in the least. I could teach it to motivated middle schoolers.

>> No.9400019

Tbh, if they say they want to be a game dev they're more than likely brainlet af

>> No.9400024

>CS backgrounds are pretty smart

They're not. They read wikipedia articles to sound smart but they don't actually understand shit.

>> No.9400025
File: 9 KB, 197x250, devilish.jpg [View same] [iqdb] [saucenao] [google] [report]

>Maybe it's a US phenomenon where CS students are absolute brainlets.
Maybe it's a US phenominon where everyone is an absolute brainlet

>> No.9400026
File: 271 KB, 461x373, 1513995560416.png [View same] [iqdb] [saucenao] [google] [report]

>getting quints

>> No.9400034

A friend of mine does CS, he said a guy on the course who started at the same time as him has a youtube channel and wrote a minecraft clone from scratch in 48 hours. There are definitely some smart people there.

>> No.9400036

how from scratch? like assembly?

>> No.9400042


>> No.9400043

probably at your Uni they don't, but here its a giant meme my dude

>> No.9400052
File: 38 KB, 552x557, 1426818766460.jpg [View same] [iqdb] [saucenao] [google] [report]

>those integers

>> No.9400054

Oh shit another fellow bioinformatican. How's it going?

>> No.9400055
File: 458 KB, 256x256, fuckup think.gif [View same] [iqdb] [saucenao] [google] [report]

Why do biocucks need to strawman this hard to make their useless trash major look better than the actual $300k starting major?

>> No.9400056

Just switched my major from Mechanical engineering to computer science. Did I fuck up?

>> No.9400059
File: 52 KB, 600x600, 1514154307792.png [View same] [iqdb] [saucenao] [google] [report]

>I have a degree in Computer Science

>> No.9400062

Learn some programming and realize that isn't really impressive.

>> No.9400063

>tfw my buddy with a BA in linguistics now works at a tech recruiting firm giving out 6 figure jobs to guys with no degree, just a few certs

Programming jobs are one hell of a meme.

>> No.9400232
File: 113 KB, 659x1161, 1514520217890.png [View same] [iqdb] [saucenao] [google] [report]

Is this you, OP?

>> No.9400284

>I can make pretty pretty apps so who cares if I can't solve problems I've never seen before...

>> No.9400288

quints of truth
CS majors can enjoy getting pajeeted in five years

>> No.9400290

nice try but even in SF/SD that is absurdly high for a CS bachelors
2/10 got me to reply

>> No.9400353

Why the hell would you need to invert a binary tree? The whole point is that it's already sorted

>> No.9400355

He was talking about a mathematician's starting salary you doofus

>> No.9400370

No, scratch the programming language.

>> No.9400374

Of course C"S" students would be using Scratch, lmao

>> No.9400379

They want to know if you can write:

void invert(Node* node){
if(!node) return;
std::swap(node->left, node->right);

Also, they never said it was sorted you retarded CS major.

>> No.9400397

>reading comprehension

>> No.9400398

BSTs are literally sorted by nature you retarded fucking faggot

>current node
>node with a value less than parent node to the left
>node with a value greater than parent node to the right

>> No.9400404

>writing C++ like C-with-classes

>> No.9400406


That's what you do. You don't need to pass smart pointers for something so trivial.

>> No.9400407
File: 80 KB, 771x357, iscfast.jpg [View same] [iqdb] [saucenao] [google] [report]

>literally sorted by nature
I hope you're joking and binary trees are not BSTs

>> No.9400411

>all binary trees are binary search trees
Engineering major detected

>> No.9400419

No point for regular-ass binary trees to exist.

Talk about completely useless shit. My data structures class didnt even talk about them. They just went straight to BSTs.

>> No.9400422
File: 208 KB, 938x872, 0-1knapsack.png [View same] [iqdb] [saucenao] [google] [report]

>CS is le easy

>> No.9400426

Dynamic programming is literally taught in your second semester java course.


>> No.9400429

Yes because engineering jobs are unionized.
Chad's unionizes.

>> No.9400434

>I don't know a use for a binary tree so it's useless
Pajeet plz

>> No.9400437

>lol u dont know how 2 use uh binary tree or a gaynary tree or a trinary tree or a quadrinary tree of a vaginary tree
Fuck off

>> No.9400444

I can't tell if you're trying to mock CS or imply that this is a hard problem

>> No.9400464
File: 135 KB, 984x1421, 0polygon.png [View same] [iqdb] [saucenao] [google] [report]

>le easy

>> No.9400471

Another piss-easy C""""""""""S"""""""""" problem

Keep em comin

>> No.9400472

Post the solution :^)

>> No.9400474

Not gonna help you with your homework faggot

>> No.9400475

I don't really know the terminology, what is "dynamic" about this? Seems like a normal problem

>> No.9400511

Sup dudes
What are you working on?
What are the job prospects in bioinformatics (especialy in europe where I guess the first anon is from) ?

>> No.9400599
File: 110 KB, 747x738, UeLKl7Z.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.9400657

First semester here so I am working on basic math right now. Job prospects are good though, at least that's what everyone says. You might have to move because there aren't a lot of places to go for these kind of jobs.
Pay is less than CS but overall I really enjoy it this far.

>> No.9400663

This is not true in any universe.

>> No.9400670

Someone with a BS in CS doesn't know much about CS, the same way that someone with a BS in Biology doesn't know much about Biology. They only know the basics. This is true in every field.

All the smart ones go to grad school to become actual computer scientists.

>> No.9400676

It doesn't really refer to the problem but the algorithm used to solve it. If you can speed up an algorithm by saving the results of subproblems so that they don't have to be computed more than once, you have a DP algo.

>> No.9400681

This only applies in the shithole that is burgerland, in other countries its a lacerous major

>> No.9400690

The obvious solution is O(n^2). Is there a better one?

>> No.9400993
File: 156 KB, 378x565, Based Draper 0.jpg [View same] [iqdb] [saucenao] [google] [report]


wew lad

>> No.9401181

>The obvious solution is O(n^2)
Not even close to correct.

>> No.9401282
File: 568 KB, 652x795, 1512366220435.png [View same] [iqdb] [saucenao] [google] [report]

>CS majors think babby geometry is difficult

>> No.9401304

>not thinking
yeah, that's the problem

>> No.9401334

Nothing its a litteral buzzword. Search "name origin dynamic programming" and you will find the answer would link it but captcha tells me im a bot.

>> No.9401448

Started my CS degree this year, will be switching to Math asap. My courses are piss-easy

>> No.9402764
File: 297 KB, 836x1136, 1513067679808.png [View same] [iqdb] [saucenao] [google] [report]

better version

>> No.9402946
File: 21 KB, 200x226, brainlet dance.gif [View same] [iqdb] [saucenao] [google] [report]

>every binary tree is a search tree

>> No.9402950
File: 41 KB, 645x773, brainlet boxer.gif [View same] [iqdb] [saucenao] [google] [report]

>iterating through [math]n \choose 2[/math] possible line segments isn't [math]O(n^2)[/math]

>> No.9403155
File: 6 KB, 250x246, 1419564682045s.jpg [View same] [iqdb] [saucenao] [google] [report]

I know you're exaggerating but I wouldn't be surprised if this is true. If so, could ya give a fellow anon some... tips to be a non cs major anon?

>> No.9403191


the landing strip doesn't have to start or end on vertices. it can run along edges too.

>> No.9403216


with no restrictions on the shape of the island this seems like a pretty difficult optimization problem.

>> No.9403228

[math]n \choose 2[/math] also contains preexisting edges, you can try extending each edge you run across.

>> No.9403245


i don't follow you. what do you mean "pre-existing edges"?

the problem is just to find the longest line within an arbitrary polygon, which is probably np-complete.

>> No.9403252



>> No.9403623

>My data structures class didnt even talk about them.

Guess how I know your uni is absolute shit?

>> No.9403758
File: 28 KB, 423x423, 1501930398319.jpg [View same] [iqdb] [saucenao] [google] [report]


How about this...

Start somewhere on an edge.
Travel all around the shape for x iterations (as granular as you want).
For every iteration of x, iterate y degrees from start to end (for example, if there is an x point on a straight line, we are iterating 180 degrees).
Project each y iteration directly across until it hits another edge.
Calculate distance.
If larger than currently stored distance, store start and end points.

That's your brute force solution.

You could do little optimizations like not calculating distances for same pairs of start and end points but I doubt that will help as much as a solution that was not brute forced.

>> No.9403778

This is retarded and wont work for all cases because "as granular as you want" doesn't mean anything if you have to change the granularity for certain problems then your solution doesn't work for everything, look up ray casting you niggers.

>> No.9403790
File: 6 KB, 400x373, 161a324a8586075c0eb86facb03823300073c581188a284d9443e818a45510c3.png [View same] [iqdb] [saucenao] [google] [report]

Did you even read the problem, you stupid bitch? It's saying the error has to be within 10^-6 which was the reason for the granularity.

Also, you're even more of a stupid bitch since what I described was Ray casting a fucking shit ton of times around every point and every angle at thise points.

God, go fuck yourself.

>> No.9403793

And the granularity is used to describe an infinitesimal.

>> No.9403811

>tfw CS/double major student
I want to die

>> No.9403813


>> No.9403831
File: 1.68 MB, 384x288, let me assisst you, doctor.gif [View same] [iqdb] [saucenao] [google] [report]

me too

>> No.9403836

CS major here graduating in may and have 2 job offers already one for 80k one for 72k how is being poor other majors? I'm also doing grad school part time while I work after I graduate and will finish within 3 years and get over 100k easy any place I want to live in the U/S.

>> No.9404048


like a moving "radar scan" along the perimeter? that's probably not a bad approach.

i'd probably just compare the distance between every pair of vertices and checking whether there's a clear path between them, despite this not being strictly correct. if the island is a convex polygon then i think this will yield the optmal answer. if it's not convex then maybe start doing a search like yours around the most promising vertices.

>> No.9404384

Here's my go:
1. Loop through all pairs of vertices, time n^2
2. Loop through all edges, time n
3. If the edge of step 2 intersects the line of step 1 in the middle, then go to next iteration in step 1. If the line of step 1 may continue past a vertex, then compute the length using the intersections of step 2. Constant time?

This should work for all polygons/islands whose shoreline does not intersect with itself, but I don't think these cases are valid anyways. Total time around n^3.

>> No.9404388
File: 30 KB, 481x425, 1514070409979.jpg [View same] [iqdb] [saucenao] [google] [report]

>i have a degree in doing math without a calculator

>> No.9404413
File: 736 KB, 1080x1080, Screenshot_2017-12-30-16-57-48-1.png [View same] [iqdb] [saucenao] [google] [report]

>i have a degree in doing math without cross referencing to validate checking if my answers are actually correct

>> No.9404415
File: 475 KB, 1080x1080, Screenshot_2017-12-30-17-01-37-2.png [View same] [iqdb] [saucenao] [google] [report]

>i have a degree in being certified slower and less accurate than any automated computing device since 1970

>> No.9404444

>Total time around n^3.

no, O(n^2).

>This should work for all polygons/islands whose shoreline does not intersect with itself, but I don't think these cases are valid anyways.

if the island's polygon is allowed to be non-convex then i'm pretty sure it's an np-hard problem. correct me if i'm wrong though.

>> No.9404475
File: 26 KB, 208x232, CSmajor.png [View same] [iqdb] [saucenao] [google] [report]

>took design of algorithms
>actually had to program most of them
>too much of a brainlet to program Dijkstras with a priority q
>use nearest neighbor approx instead
>get the right output for sample data
>get 100 for the assignment

>> No.9404492

this is god's current year way of speaking to us

>> No.9404499

Funny how even STEM brainlets themselves are at ends with each other.

Knowledge is a dangerous thing and the world and the human condition within that world are disproportionately fragile compared to what a few thousand or million overzealous retards with uncertain knowledge and overcertain convictions can do to them. To someone with a philosophical or metaphysical sensibility for how difficult certainty really is to come by, or any knowledge of the history of science, STEMfags look like a bull in a china shop.

It's not that they are wrong on a few key things, it's that they have the conceptual sophistication of a child and there isn't even any way to teach them anything. They are so far gone down a path of stupidity, paved with incorrect axioms and getting wronger with every step, that helping them would require deprogramming their entire worldview from the ground up. And they don't even want to be deprogrammed, because, also like children, they're filled with enthusiasm to apply their broken ideas to reality, and those broken ideas are incidentally very effective at generating self-referential and circular feedback, that is, proving themselves "correct" as a foregone conclusion.

If STEMfags were just flat wrong about one or two things, the instinct would be to correct them. The problem is that they're tangled heaps of wrongness, who also want to destroy the entire planet. I don't disagree with them ideologically because that would imply they have an ideology. They are just the useful idiots of a few diseased and long debunked ways of visualizing the universe, views that perpetuate themselves like a virus by preying on the intellectually weak and lazy. Scientism is an historic bloc that reproduces itself so that it can reproduce itself, and brings all its debunked and dangerous epistemes along for the ride.

I feel bad for you. I honestly do.

>> No.9404523

What do you mean by pair of vertices? Like the vertices that make an edge?

>> No.9404530
File: 128 KB, 1080x2220, sketch1514686577514.png [View same] [iqdb] [saucenao] [google] [report]

Probably will fail for something like pic related

This would work on pic related

>> No.9404534

>essay on enviro policy concerning a local watershed
>had to engage the public somehow
>literally just went through the rubric and bullshitted for each requirement
>added some in-text citations and a works cited page

>> No.9404552

More to do with how redundantly retardedly useless most math is.

>> No.9404558

>Go on /biz/, reminded I sold Bitcoin at $100
>Go on /sci/, reminded the degree I chose is apparently shit because of course it is
>Go on /pol/, reminded there's no point anyway America is almost over
I should just read books and work at the grocery store like I did in high school. I'm not cut out for the 21st century

>> No.9404990
File: 9 KB, 926x690, Untitled.png [View same] [iqdb] [saucenao] [google] [report]

I mean any pair of distinct vertices. The idea is basically the same as >>9404048 but you also check for intersections and continue the lines past vertices if possible.

I would think that the method works. The attached picture shows the simplified problem; if there exists a case in which AB - which passes through only one vertex - is the longest line, then the method will not work. However, in these cases either CD or EF should(?) be longer. I tried applying cosine rule and got something, but couldn't quite complete the proof...

>> No.9405002
File: 2.52 MB, 992x1001, Plasma.png [View same] [iqdb] [saucenao] [google] [report]

lmfao CE underman here, in our algorithms & optimization course DKP was literally the retard option for people who didn't understand how to work with TSP, and dynamic programming was like the 2nd algorithm they had to implement, which everyone already had done anyway because it was already required in a previous data structures course. At least go for PTAS.

>> No.9405148
File: 129 KB, 675x1200, bubbles3.jpg [View same] [iqdb] [saucenao] [google] [report]

>go on /fit/
>reminded girls hate men less than seven foot
>got on /g/
>reminded girls won't talk to men with green bubbles
>go on /b/
>reminded girls have penises

What's /sci/s problem with girls?

>> No.9405239

What is this "girls"

>> No.9405241

try to do it and realize that it kinda is

>> No.9405244

Maybe you are just a brainlet :(

>> No.9405253

is this even real

>> No.9405259
File: 69 KB, 645x729, e09.png [View same] [iqdb] [saucenao] [google] [report]

What is a binary heap.
Engineer detected

>> No.9405389 [DELETED] 

>which passes through only one vertex

i think any solution has to pass through at minimum one vertex, so at least that would constrain the search somewhat.

the problem is situations like the one you illustrated, where you have a solution that involves fewer than two vertices.

since it's a polygon and not an arbitrary shape, there may be some algorithm from computational geometry that solves this efficiently, but idk.

>> No.9405406

What about Computer Eng.? Is it any better?

>> No.9405410

>if there exists a case in which AB - which passes through only one vertex - is the longest line, then the method will not work.

AB isn't the longest line here.

if it's the case that any solution has to involve at least two vertices, then you can search every pair, "extend" their line to the perimeter, then compare lengths. similar to what i think >>9403228 meant.

if there exist solutions involving only one vertex, then it's probably a much harder problem.

>> No.9405430


actually, i think it's polynomial, maybe O(n^2)

if have some line within the polynomial that touches edges but no vertices, then you can always extend that line by pivoting it until it hits a vertex, and then fix it at that vertex and do the same to extend the other end point. either the end point of the line will hit a vertex, or the line will hit a vertex. so any solution seems to involve at least two vertices.

so by searching each pair of vertices, and then extending each line (straight out, not like above), you'll will find an optimal solution, i think

>> No.9405443

>within the polynomial


>> No.9405490

>maybe O(n^2)

actually O(n^3) worst case, since you'd need to iterate through the lines again to figure out where each "extension" intersects each edge.


was correct.

>> No.9405505

Cosecant(theta) is strictly concave where it is positive, and sum of concave functions is concave, so the optimum solution should involve two vertices.

>> No.9405509

I wonder if there is some data structure that will speed up the iteration through lines, as you progress through the possible directions through a chosen vertex?

>> No.9405515
File: 496 KB, 512x384, 1506910799275.gif [View same] [iqdb] [saucenao] [google] [report]

>so the optimum solution should involve two vertices.

yeah, that's what i figured in >>9405430

tfw wasting quint 4's on such an embarrassing misstep >>9404444

i assume that in the case where it's an area enclosed by an arbitrary smooth perimeter it would be np hard. this algorithm only works when the shape is discretized coarsely enough to make n^3 or n^2 vertices tractable

>> No.9405551

>through a chosen vertex?

you're dealing with pairs of vertices. since the polynomial can be non-convex, you have to attempt to extend each end of the line.

without knowing any specific algorithm offhand, i guess this would be at least linear time for every line (pair of points), if not more. solve the lines to find where they intersect, check if the solution lies within the edge, if not discard the edge, if so add it to a list. then once we have all the intersections, check which ones (for each of the two end points) are the closest, and then take that as the new line.

Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.