Computer Science: Theory and Application

Subscribe to Computer Science: Theory and Application feed
Computer Science Theory and Application. We share and discuss any content that computer scientists find interesting. People from all walks of life welcome, including hackers, hobbyists, professionals, and academics.Computer Science: Theory and Application
Updated: 17 min ago

Does putting Haskell and Common Lisp in my resume a good idea?

2 hours 4 min ago

I'm an 3rd year CS undergraduate, and I have some projects in Haskell and Lisp (also in Java)

PS: I've worked through HTDP, SICP and PAIP

submitted by /u/Keil-Eden
[link] [comments]

SEEKING ADVICE!

4 hours 29 min ago

Hello everyone,I am about to start my semester and planning to to specialisation in cloud computing.Any particular language that i should learn which could give me an edge or any particular certification that i i should give for my own advantage(career wise)?

submitted by /u/helpnhelper
[link] [comments]

Topics of research in Computer Science

8 hours 32 min ago

Hello everyone! I wonder, what are the latest topics of research in Computer Science!

submitted by /u/durgesh2018
[link] [comments]

Degree question

Thu, 01/17/2019 - 21:05

I am planning on switching from a computer science honors degree to a mathematics and computer science degree. But since its technically in the math department, does this take away any employability?

submitted by /u/particlect
[link] [comments]

CompSci Weekend SuperThread (January 18, 2019)

Thu, 01/17/2019 - 20:05

/r/compsci strives to be the best online community for computer scientists. We moderate posts to keep things on topic.

This Weekend SuperThread provides a discussion area for posts that might be off-topic normally. Anything Goes: post your questions, ideas, requests for help, musings, or whatever comes to mind as comments in this thread.

Pointers
  • If you're looking to answer questions, sort by new comments.
  • If you're looking for answers, sort by top comment.
  • Upvote a question you've answered for visibility.
  • Downvoting is discouraged. Save it for discourteous content only.
Caveats
  • It's not truly "Anything Goes". Please follow Reddiquette and use common sense.
  • Homework help questions are discouraged.
submitted by /u/AutoModerator
[link] [comments]

Big O coeficients

Thu, 01/17/2019 - 19:52

I have these questions and solutions, but I have no idea how they get the coefficients. May some one please expalin:

Here is my efforts:

def factorial(n): x = 1 for i in range(2, n): x = x * i return x

Solution is T(n) = n + 1, T(n) = O(n) this one I got as x = 1 line runs once, so that is the 1 and then x = x * 1 runs max n times.

def loopy0(n): x = n for i in range(3, n+2): for j in range(5, n * 2): temp = i + j x = x + temp return x

Solution is T(n) = 8n^2 - 28n + 22, T(n) = O(n^2) but I was getting 1 + [(n + 2)(n * 2)] as first line x = n runs once, and then the lines temp = i + j runs max of n + 2 times n * 2.

def loopy1(n): x = factorial(n) for i in range(3, n+2): for j in range(5, n * 2): temp = i + j x = x + temp return x

Solution is T(n) = 8n^2 - 27n + 22, T(n) = O(n^2) but

def loopy2(n): x = n for i in range(3, n+2): for j in range(5, 10): temp = i + j x = x + temp return x

Solution is T(n) = 20n - 18, T(n) = O(n)

submitted by /u/Noitidart2
[link] [comments]

OS that runs windows programs?

Thu, 01/17/2019 - 15:31

If I were to develop my own OS, like Apple's Macbook OS, could I make it so it could run all windows programs? So I could open Photoshop's windows version as if I were using a windows operating system. Would this be illegal or protected by Microsofts patents or trademarks? Thank you.

submitted by /u/anotheroneflew
[link] [comments]

Searching in ACM Digital Library?

Thu, 01/17/2019 - 12:36

I am looking to do a database demonstration from our library for students in a cloud computing course. The students need to seek out articles once a week to do a short presentation on. Are there any good keywords or search strings I could use to demonstrate that there's good content in here? I reviewed the syllabus and list of topics covered each week, but they're very generic like "cloud security", "advanced cloud architecture", etc. These don't yield good results and what little I know about comp sci don't sound like good keywords or search strings to look up! What are some questions a student might ask and want to look up by?

Also, most of the time when I put things in like "cloud security" etc I'm pulling conference proceedings but the instructor wants the students to use peer-reviewed journal articles (I'll also be demonstrating IEEE Xplore and ScienceDirect and am not having any issues with those platforms), I am really stymied when it comes to ACM Digital Library.

I'd love to hear input from people who DO use this resource regularly...

submitted by /u/Nandinia_binotata
[link] [comments]

My Thoughts on Getting a Software Engineer Job at Google

Thu, 01/17/2019 - 11:10

I recently failed miserably during the Google Software Engineer interview process and I wanted to share my thoughts in hopes to help the next person that thinks they are good enough to work at Google (you are not good enough). Most of the research says that a huge majority fail the first time interviewing and this is because you are the wrong type of programmer and/or did not train.

Your past experience only gets you the opportunity to interview. Don't think that because you have coded for 10+ years the interview process will be easy or Google will read your resume and hire you on the spot.

  1. They don't want programmers that can build software with libraries. They want computer scientists that can solve difficult problems with the most efficient code ever, this is a huge difference that I did not realize until after I failed. I have a CS degree (4.0 gpa), 20 exp years building internet companies, business degree, coded for 20+ years in over 10+ languages, but I still fall into the first category "programmers that can build software with libraries"
  2. Why does Google only want computer scientists that can solve difficult problems with the most efficient code ever? This is because of it's scale, they are not in the business of building a simple website with the coolest, newest framework. Pretty much all frameworks can't perform at Google's scale, without major re-engineering.
  3. So how do you get a job? An analogy is a heart surgeon is not going to attend a 2 month heart surgery bootcamp and get a job at a hospital. You have to be at a Doctor level expertise with your CS knowledge, one or more programming languages, and solving hard algorithm problems quickly. If you are not at a Doctor level expert in any of these areas the interview process will expose you.
  4. Most important is the ability to solve algorithm problems? Don't even think about applying until you can solve most of the hard problems on hackerrank, euler project and leetcode quickly. I am talking about putting in a massive amount of time here. These problems do two things, they perfect your understanding of a language and teach you how to build efficient algorithms quickly. In the technical phone screen you have 30 mins to solve and code the solution to either a medium or hard problem. You have one shot, no pressure at all...haha.
  5. Google welcomes everyone to apply for a job, but you have to remember your competing against all the other candidates, some that have been training for years. Another analog: you wake up and say I am going to run a 5k race in month, you have experience jogging for the past 10 years. When you get to the race there are people that have been hardcore training for years and they destroyed you and then you die of a heart attack.

Summary: I wish someone would have told me this before the interviewed and I would have spent another 6 months training.

Google is an awesome company because of it only hires engineers that perfectly fit into its culture. Their process does a great job of weeding out the wrong type of programmers.

This is just my take on the process, I love Google and have a massive amount of respect for them. They have given me the gift of how to become an expert programmer. I will apply again in a year.

submitted by /u/empirecore
[link] [comments]

How easy is it to code an auto email if a certain value is not entered in an online form?

Thu, 01/17/2019 - 06:07

Say a embassy needs a specific city entered in a field in a form that applicant fills out online. If a different city is entered, an auto email is sent, saying sorry you can't book here.

submitted by /u/bee4534
[link] [comments]

Parallelize Database synchronization

Thu, 01/17/2019 - 04:50

I am not sure if this is the right place to post this, but I think you guys may help me find some literature on this subject. If it is not, please tell me, I will delete this post.

I want to synchronize the information of one database into another database. This sync then repeats itself every hour and only updates those values who have changed.

Some tables (lets call one of those tables "Persons") contain lots of foreign keys, so that means the tables which they refer to have to be synchronized first. Some tables even contain circular references. One way to fix this, is to first sync all the data that is not a foreign key. The DMS has now created keys for every entry, and now it is guaranteed that every entry exists. Now you can first sync Persons and then its dependencies, and then their dependencies etc.

However, when Persons has more than 100.000 entries, this becomes rather cumbersome. People accessing the data during that sync would see a lot of dirty data.

To fix this, one would suggest to subdivide the sync of Persons into smaller chunks of, for instance, 100 entries. This has 2 advantages:

  1. The process becomes highly parallelizable
  2. Would one error occur during one of the syncs, not a lot of data has been compromised

Now here we come at the core of my problem: how do we synchronize the dependencies? It is not guaranteed that the foreign keys are already in the new database and if not, we have to synchronize those values too. Continuously querying the sync-to-database and the sync-from-database during the process to see if a value is already there (and if not, adding it) would add a lot of traffic and completely annihilate
I do not believe I am the first one who has to tackle this problem. However searching on Google I cannot find general design patterns or solutions. I think I am using the wrong terminology.

So my question is, do you have any knowledge concerning this problem? Can someone help me find information about this kind of problem? Or at least supply me with some terminology I want to look for?

TL;DR: I need to synchronize a whole database to another database, how do you divide this process into smaller chunks if a lot of tables refer to others?

submitted by /u/RichardMau5
[link] [comments]

Multi-factor sorting algorithms

Thu, 01/17/2019 - 00:22

Hello, I recently came across this article http://www.evanmiller.org/how-not-to-sort-by-average-rating.html. The article covers a few ways to create sorting scores. However, the examples are only for 2 factors, positive vs negative comments or positive vs all comments. What if I have 10 factors I want to consider?

I checked my algorithms book for weighted sorting algorithms, but didn't find anything.

I'm curious about how I could come up with a sorting score for something with n factors? In addition, how do I handle factors that are more desirable in different ways? For example:

  • factor A is more desirable if it's closer to 0
  • factor B is more desirable if it's bigger
  • factor C is more desirable if it's closer to 3
  • factor D is more desirable if it's more negative

Are there standard ways of doing stuff like this?

submitted by /u/om0tho
[link] [comments]

Request-Review for P versus NP paper

Wed, 01/16/2019 - 23:39

P versus NP is considered as one of the most important open problems in computer science. This consists in knowing the answer of the following question: Is P equal to NP? A precise statement of the P versus NP problem was introduced independently by Stephen Cook and Leonid Levin. Since that date, all efforts to find a proof for this problem have failed. Given a positive integer x and a collection S of positive integers, MAXIMUM is the problem of deciding whether x is the maximum of S. We prove this problem is complete for P. Another major complexity classes are LOGSPACE, LOGTIME and coNP. Whether LOGSPACE = P is a fundamental question that it is as important as it is unresolved. We show the problem MAXIMUM can be decided in logarithmic space. Consequently, we demonstrate the complexity class LOGSPACE is equal to P. Moreover, we define a problem called SUCCINCT-MAXIMUM. SUCCINCT-MAXIMUM contains the instances of MAXIMUM that can be represented by an exponentially more succinct way. We show this succinct version of MAXIMUM is in coNP-complete under logarithmic reductions. Hence, under the assumption of P = NP, we obtain the padded version of SUCCINCT-MAXIMUM is in LOGTIME and P-hard. However, this is not possible according to LOGTIME is strictly contained in LOGSPACE, because that result would imply LOGTIME = LOGSPACE. In this way, we demonstrate the assumption of several computer scientists whom fully expect that P is not equal to NP.

https://www.academia.edu/38165921/P_versus_NP

https://zenodo.org/record/2542348

submitted by /u/frankvegadelgado
[link] [comments]

How does one parse a Lisp expression?

Wed, 01/16/2019 - 23:21

Hello r/compsci!

I originally posted this question on r/learnprogramming but I received feedback that this might be more suitable for this community.

I am trying write a simple parser for restricted Lisp expressions, but I just can't wrap my head around a good solution. Please see the details here. I know there are a lot of solution out there, but I don't understand them unfortunately.

I think the grammar is the following:
E = aE | mE | lE | int | var
aE = E0 + E1
mE = E0 * E1
lE = var_0 E_0 var_1 E_1 ... var_N-1 E_N-1 E_N

where
E stands for expression,
aE add-expression,
mE mult-expression,
lE let-expression,
int integer, and
var stands for variable.

I parsed the input to a list of strings but then I wasn't able to create the abstract syntax tree. I'm not even sure if need to create it. For example if the input is "(add 1 (mult 2 3))" AST would be ["add", "1", ["mult", "2", "3"]].

Conceptually if I can do recursive evaluation, I should be able to solve this problem, but how do I implement this? If someone could point me to the right direction, that would greatly be appreciated.

submitted by /u/originalgainster
[link] [comments]

Pages