Math in Software Engineering / Computer Science degree

Thread Starter

StrongPenguin

Joined Jun 9, 2018
307
So I had my first class today (studying SE), which was Computer Networks. At the end of the lecture, the teacher posed a few exercises, which looks nothing like what I had, when I did my marine engineering degree. I can see the logic in the exercises, but I was wondering which branch of math this is, so I can study it more closely, since I have a feeling I will be seeing a lot of it.

A few examples:

Suppose you have forgotten a password with 5 characters.
You only remember:
➢ the 5 characters are all distinct
➢ the 5 characters are B, D, M, P, Y
If you want to try all possible combinations, how many of them in total?

What if the password is in the form adaaada?
➢ a means letter, d means digit
➢ all characters are all distinct
➢ the 5 letters are B, D, M, P, Y
➢ the digit is either 0 or 1
How many combinations are there?

What if the password is in the form adaaada?
➢ a means letter, d means digit
➢ all characters are all distinct
➢ the 5 letters from B, D, M, P, Y, Z, W
➢ If B appears in the password, D will not be allowed to appear
➢ the digit is either 0 or 1
How many combinations are there?
 

jpanhalt

Joined Jan 18, 2008
11,087
I am not sure it is a specific field of math. The area would be called Combinations and Permutations.

Statistics is the closest area I can think of, but then I had very few math classes. None after high school.
 
Last edited:

WBahn

Joined Mar 31, 2012
30,062
I would say that it is "combinatorics" and is generally seen, to greater and lesser degrees, in courses such as Probability and Statistics (namely discrete probability), Discrete Math, and any course dealing with Set Theory.
 

Thread Starter

StrongPenguin

Joined Jun 9, 2018
307
The problem was me not having math for about 10 years, and we started with something that I never even seen before. If it was trigonometry or functions, I would feel more comfortable. The course is supposedly not math heavy, but I don't wanna fall behind, though.
 

WBahn

Joined Mar 31, 2012
30,062
I am sure you are both "proud." Why do either of you think I care one twit?
I don't know what PB's point was. I was merely making a purely light-hearted reference to how much time most of us that are anything resembling regulars here (most definitely myself included) fritter away on the internet (even if this is the only place we go on it). I apologize if it somehow offended either one of your sensibilities.
 

WBahn

Joined Mar 31, 2012
30,062
The problem was me not having math for about 10 years, and we started with something that I never even seen before. If it was trigonometry or functions, I would feel more comfortable. The course is supposedly not math heavy, but I don't wanna fall behind, though.
Pick up most introductory books to prob/stats that are targeting scientists and engineers and the first portion is usually discrete probability and early in that material quite a bit of time is spent on how to count the number of ways that things can happen given various constraints. That will probably be enough for your needs.
 

jpanhalt

Joined Jan 18, 2008
11,087
@WBahn
Please accept my apology. After reading PB's comment, I completely misinterpreted your comment. With fresh eyes, it is clear what you meant, and I am sorry to have included you in my reply.
John
 

Hymie

Joined Mar 30, 2018
1,284
I suspect the purpose of the lecturer setting the examples is to get you thinking about the answers and how you worked out the answers – the next step would be to transfer that technique into computer programming.

Whilst it might not seem to have an obvious application in computing – knowing the possible total permutations (to which you are trying to find a solution), could give an indication of the computational time required to reach the solution(s).
 

bogosort

Joined Sep 24, 2011
696
The problem was me not having math for about 10 years, and we started with something that I never even seen before. If it was trigonometry or functions, I would feel more comfortable. The course is supposedly not math heavy, but I don't wanna fall behind, though.
The branch is called discrete mathematics, which includes logic, set theory, counting (combinatorics, discrete probability), graph theory. If such a class is part of your curriculum, take it as early as possible, as you will very likely need some familiarity with these topics in most CS/SE courses. If not, pick up a textbook (or PDF) and use it as a crash-course when needed. I can recommend Discrete Mathematics and its Applications by Rosen.
 

Thread Starter

StrongPenguin

Joined Jun 9, 2018
307
We will have a course in Discrete Mathematics, but that is later on :confused:
I will study something now, just to be up to date with what the teacher is talking about. Thanks for the book rec.
 

Deleted member 115935

Joined Dec 31, 1969
0
@Hymie Yes, most likely. We are a bit far from any programming, though, but this is probably a fine primer.
programming is a lot about how to break up a problem into bits that can be dealt with,

I remember even now being asked to write a list of what I did in the morning to brush out teeth.
Nothing to do with programming ? , but getting one to think about flow , cause and effect. Key parts of programming.

keep with it, and good luck
 

WBahn

Joined Mar 31, 2012
30,062
While programming forces one to break up problems (often referred to as functional decomposition), most problems are amenable to it and math problems are not different.

The brushing teeth example is less about breaking problems down into smaller bits (decomposition) but more about algorithmic reasoning (expressing the solution to a problem in clear, unambiguous, executable steps free from contradiction or omission). While the two are different, they are certainly tightly coupled in practice.
 

BobaMosfet

Joined Jul 1, 2009
2,113
So I had my first class today (studying SE), which was Computer Networks. At the end of the lecture, the teacher posed a few exercises, which looks nothing like what I had, when I did my marine engineering degree. I can see the logic in the exercises, but I was wondering which branch of math this is, so I can study it more closely, since I have a feeling I will be seeing a lot of it.

A few examples:

Suppose you have forgotten a password with 5 characters.
You only remember:
➢ the 5 characters are all distinct
➢ the 5 characters are B, D, M, P, Y
If you want to try all possible combinations, how many of them in total?

What if the password is in the form adaaada?
➢ a means letter, d means digit
➢ all characters are all distinct
➢ the 5 letters are B, D, M, P, Y
➢ the digit is either 0 or 1
How many combinations are there?

What if the password is in the form adaaada?
➢ a means letter, d means digit
➢ all characters are all distinct
➢ the 5 letters from B, D, M, P, Y, Z, W
➢ If B appears in the password, D will not be allowed to appear
➢ the digit is either 0 or 1
How many combinations are there?
combinations are all exponential. A password is the same as a combination lock with wheels. How many digits on each wheel, how many wheels.

Example: 3 wheels, each with 0-9. that's 10 digits on 3 wheels. combinations: 10^3
Example: 5 wheels, 26 digits: 26^5
 
Top