discrete-mathematics
Regex that defines a regular language with {a,b} without a substring with exactly 3 b's (bbb)
Pretty much what the question says. I came up with (ba)?(a + bb + bbbbb + aba)*(ab)? Is there anything more readable? Or is this incorrect?[详细]
2023-01-09 20:38 分类:问答Check if wind direction is within a specified range
I am representing wind directions using integer values (an Enum) ranging from 0 for North, through to 15 for North-North-West.[详细]
2023-01-08 20:28 分类:问答Optimization problem - finding a maximum
I have a problem at hand which can be reduced to something like this : Assume a bunch of random points in a two-dimension plane X-Y where for each Y, there could be multiple points on X and for each[详细]
2023-01-08 20:05 分类:问答How do you calculate log base 2 in Java for integers?
I use the following function to calculate log base 2 for integers: public static int log2(int n){ if(n <= 0) throw new IllegalArgumentException();[详细]
2023-01-08 13:33 分类:问答Python, dictionaries, and chi-square contingency table
This is a problem I\'ve been racking my brains on for a long time, so any help would be great. I have a file which contains several lines in the following format (word, time that the word occurred in,[详细]
2023-01-03 01:44 分类:问答Is it possible to implement bitwise operators using integer arithmetic?
I am facing a rather peculiar problem. I am working on a compiler for an architecture that doesn\'t support bitwise operations. However, it handles signed 16-bit integer arithmetics and I was wonderin[详细]
2023-01-02 16:18 分类:问答What would be a good general algorithm for approaching integer sequence problems?
Say the input will always be the same number N of numbers (e.g., 5) and assume the integers actually have a mathematical relation (no lengths of the numbers \'one\', \'two\', days in the nth month, et[详细]
2023-01-02 08:31 分类:问答How would you solve this graph theory handshake problem in python?
I graduated college last year with a degree in Psychology, but I also took a lot of math for fun. I recently got the book \"Introductory Graph Theory\" by Gary Chartrand to brush up on my math and hav[详细]
2023-01-01 02:48 分类:问答Discrete mathematics problem - Probability theory and counting [closed]
Closed. This question is off-topic. It is not currently accepting answers. 开发者_如何学运维 Want to improve this question? Update the question so it's on-topic for Stack Overflow.[详细]
2022-12-30 21:02 分类:问答Pohlig–Hellman algorithm for computing discrete logarithms
I\'m working on coding the Pohlig-Hellman Algorithm but I am having problem understand the steps in the algorithm based on the definition of the algorithm.[详细]
2022-12-26 02:10 分类:问答