[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 229 KB, 460x1304, CRXL5Mj.png [View same] [iqdb] [saucenao] [google]
9283050 No.9283050 [Reply] [Original]

How do some programming problems compare in terms of difficulty to math? For example, I wrote a recursive binary search the other day, what math problem would take a similar amount of effort?
Of course this is going to be subjective, I'm just looking for opinions, and if you have another example you want to talk about that's dank too.
Pic unrelated.

>> No.9283063

programming problems are maths problems, just that you implemented the solution with a program

>> No.9283071

>coding
>difficult
Is this what codemonkeys actually believe?

>> No.9283083

>>9283071
Programming itself isn't, but the problems you solve are

>> No.9283223

>>9283050
>I wrote a recursive binary search the other day, what math problem would take a similar amount of effort?

Finding the roots of a quadratic equation using the quadratic formula. Pretty basic stuff.

>> No.9283519

>>9283050
Pre-algebra

>> No.9283586

>>9283519
Lol

>> No.9283598
File: 467 KB, 650x396, stophittingoncomputersyousillyboys.png [View same] [iqdb] [saucenao] [google]
9283598

>>9283050
If you haven't figured out how binary logic works and is implemented in the field of computer science, I have some bad news about where along the evolutionary branch of programmers you lie.

>> No.9283632
File: 287 KB, 836x1065, 1455310679806.png [View same] [iqdb] [saucenao] [google]
9283632

>>9283586
I wasn't joking.

recursive_binary_search(array, a, b, key)
if(b<a) return -1;
mid=(a+b)/2;
if(array[mid] == key) return mid;
return array[mid] > key ? recursive_binary_search(array, a, mid-1, key) : recursive_binary_search(array, mid+1, b, key);

Any middle schooler can come up with it.

>> No.9283634

curry-howard correspondence brainlet

>> No.9283839

>>9283632
Eh guess you're right. Can you think of any other common problems and their equivalents?

>> No.9283845

>>9283598
Nah, I understand it well. Not sure where I implied I didn't.

>> No.9284822

>>9283050
Maybe about as hard as solving an integral or simple induction?

Coding isn't hard, just time-consuming.

>> No.9284859

>>9283050
COMPUTER VISION M80

Requires linear algebra and calculus

>> No.9284898
File: 183 KB, 517x768, 1509924806503.jpg [View same] [iqdb] [saucenao] [google]
9284898

>>9283632
>use the principal of mathematical induction to rigorously prove program correctness

Ah, man, that one was below the belt. I've met a few CS fags in my math department and they're alright guys... but fucking kek

>> No.9284908

>>9283050
The hard parts of programming aren't the mathematics concepts but the engineering and project complexity. Don't bother listening to mathfags on the subject, who write inefficient, tiny programs for specific applications.

>> No.9284945
File: 77 KB, 694x801, 1454451012912.png [View same] [iqdb] [saucenao] [google]
9284945

>>9284908
>who write inefficient, tiny programs

You mean CS majors.

>> No.9284985
File: 169 KB, 776x486, CS expert.png [View same] [iqdb] [saucenao] [google]
9284985

>>9284908
>The hard parts of programming aren't the mathematics concepts but the engineering and project complexity

It's people like you who code shit like this:
https://github.com/saltstack/salt/commit/5dd304276ba5745ec21fc1e6686a0b28da29e6fc