• Breaking News

    Wednesday, April 10, 2019

    Is there any 3Blue1Brown of computer science? Computer Science

    Is there any 3Blue1Brown of computer science? Computer Science


    Is there any 3Blue1Brown of computer science?

    Posted: 09 Apr 2019 11:00 PM PDT

    Is there any similar youtube channels to 3Blue1Brown for computer science? Computerphile has a lot of coverage of a range of topics, but I haven't find something similar for more theoretical computer science. Would be interested in topics like algorithms and data structure, complexity theory, programming language theory, logic, machine learning etc.

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

    ‘Snip’ Converts Math Screenshots Into LaTeX

    Posted: 09 Apr 2019 12:25 PM PDT

    You can do Turing-equivalent computation by applying a single regex substitution in a loop

    Posted: 09 Apr 2019 07:28 PM PDT

    I'm not sure how well known this fact is, but I couldn't find anything about this on google.

    Here's one example of such regex: s/(^(0) 1(11)| 0(1)| (.))(.*)/\2 \3\4\6\5\4\2/ simulating a Turing-complete cellular automaton (rule110): https://ideone.com/WWypMS

    And a slightly different version that has an unbounded world: https://ideone.com/9VKPGM

    It is also possible to emulate a cyclic tag system, another Turing-equivalent model of computation. Here's an example of Collatz-iteration being encoded as a cyclic tag system and evaluated using a single regex: link. (I used Collatz example from wikipedia and converted it for a cyclic tag system using algorithm explained here)

    Here are a few more examples. Some of them use backreferences but they are not necessary for Turing-complete computation.

    A short explanation of how s/(^(0) 1(11)| 0(1)| (.))(.*)/\2 \3\4\6\5\4\2/ works:

    1. Note that using OR operators (|) in regexps together with capture groups (something) leads to some of groups matching nothing. For example s/^(0.*)|^(1.*)/\1\1\2\2\2/ doubles any string starting with 0 and triples any string starting with 1.

    2. You can do computation of 1D cellular automata by reading first 3 characters from the string, looking up the rule for them, appending output of the rule to the world and deleting only the first character.

    Transformation rules of rule 124 CA (which is the same as rule 110 but right-left reflected) can be seen in this diagram.

    They can be grouped in this way:

    # Special case, replace with 0 111 0 # Replace with 2nd character 011 1 010 1 # Replace with 1st character 110 1 101 1 100 1 001 0 000 0 

    And after simplification using regex syntax they look like:

    # Special case, replace with 0 111 # Replace with 2nd character 0(1). # Replace with 1st character (.).. 

    Expression (^(0) 1(11)| 0(1)| (.))(.*) implements these 3 cases. Since 111 becomes 0, there has to be a zero around when matching it. That's why it expects input to start with '0 '. Also we need to match both the 'replacement' character and unmatched characters after the first one, since they will be processed in the next step. That's why the first case has (11). For the second case only first two characters play a role, 3rd one is left to be matched by the last (.*)capture group. Same with the third case, except that we don't even care about the second character.

    Now the replacement part:

    s/(^(0) 1(11)| 0(1)| (.))(.*)/\2 \3\4\6\5\4\2/

    \2 is 0, but only if the first case is matched. Otherwise it's empty. Since only first case contains a ^, other cases start matching from ' ' (space).

    \3 and \4 are the extra characters matched by 1st and 2nd cases, they are to be returned to the start of the string.

    \6 is the last (.*) capture group, basically the rest of the input. Anything written after \6is appended to the end of the string.

    \5, \4 and \2 are appended at the end of the string. They match the correct replacement character for each of 3 cases.

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

    Facebook AI Open-Sources PyTorch-BigGraph Tool for ‘Extremely Large’ Graphs

    Posted: 09 Apr 2019 09:06 AM PDT

    Context Free Grammars

    Posted: 10 Apr 2019 12:24 AM PDT

    If I have a CFG that is induced by the following productions:

    S → aB | bA | CC

    A → aS | bAA

    B → bS | aBB

    C → abS | SC | ε

    how do i find how many strings of length 3 or less are generated by each non-terminal? what does this exactly mean, do I start at S everytime or do I start at each non-terminal for each respective one?

    So far I've gotten 4 for A, 4 for B, 3 for C, and 3 for S. But I'm pretty sure that is wrong

    submitted by /u/Throwawayaccount-AA
    [link] [comments]

    How to classify books/courses for ease of access

    Posted: 09 Apr 2019 11:00 PM PDT

    Hello, I'm a CS student who is designing an AI assistant for students to recommend them books/courses suitable for them. Not everyone really needs something that is heavily theoretical and likewise some students want to dive into a field but can't find the proper resources due to their abundance or they just look at the first page of google, don't find anything worthwhile/ book is too confusing and then give up.

    I would like to take your guys opinion's on what criteria should books/courses be classified on? What do you guys look at in a book/course , to decide it's worth/basis on judging it? This would be highly appreciated.

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

    How often do you get a new computer?

    Posted: 09 Apr 2019 11:38 PM PDT

    How often do you guys get a new computer? I feel that after just 3 years of having my macbook pro (late 2016 model 15 inch with 16 gb ddr3 ram quad core 2.6ghz) , it gets quite slow running normal applications and development IDE's. For example, running around 15 tabs on firefox and using Intellij or PyCharm will make my computer lag and extremely hot and laggy. This is the case even if I run just Firefox independently or just Intellij independently.

    So my question is, how frequently do you guys get a new computer?

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

    Solving the Health Problems of Software Engineers

    Posted: 09 Apr 2019 01:47 PM PDT

    Network Flow Theory

    Posted: 09 Apr 2019 06:04 PM PDT

    So I am faced with an algorithm design problem, and I could use help determining the right way to approach it. Essentially I am given n chemicals that produce energy when combined (i.e. e(i, j) = x). There are two bottles to hold the chemicals, and some chemicals are restricted to either bottle 1 or 2, while the rest are free to be put in either. The goal is to maximize the energy output between the two bottles from the reactions when chemicals are added. We can think of the bottles as two disjoint sets of chemicals, and trying to find the max flow between the two.

    I am struggling to represent/visualize the graph for this problem and how to approach it algorithmically. I have thought about min-cut max-flow, and I have related it to the classic Image Segmentation problem, but I am still stuck on where to go. Do I generate a network flow diagram with all of the chemicals represented as nodes in the middle and have the sink and source represent the two bottles? If so, how would I proceed to develop a sufficient algorithm? Any help or insight is appreciated. Ultimately trying to identify the problem in terms of a general solution.

    EDIT: Note, there is no cost to put a chemical in a bottle.

    EDIT: The other thought I had stemmed from the fact that we know initially the subsets of chemicals that must be in bottle 1 and the subset of chemicals that must be in bottle 2. I could represent the source as bottle 1 and the sink as bottle 2, initialized with having the chemicals that must be in that specified bottle. Then, the middle nodes would be the chemicals that could go in either bottle. The arrows from the source to chemical i and similarily from chemical i to the sink would represent the value of placing that chemical in the specified bottle. This seems to call for a greedy strategy since there exist no additional costs. But, once again, I don't know if this is right, and I don't know where to take it from there

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

    Is a set of vertices for a key a good data structure for a graph adjacency list?

    Posted: 09 Apr 2019 05:17 PM PDT

    Most graph representations Ive seen use a single key . Is using sets (set()/{}) a good idea to define directed and undirected graphs? ``` from collections import defaultdict class Graph: def init(self): self.graph = defaultdict(list)

    def add_edge(self, src, dest, distance): self.graph[(src,dest]) = distance 

    graph = Graph() graph.add_edge('A','B',7) graph.add_edge('B','C',3) graph.add_edge('B','A',7) ``` Will the keys become a issue for bidirectional graphs?

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

    Free PDF downloads of Hello World magazine - the Computer Science magazine for educators

    Posted: 09 Apr 2019 08:41 AM PDT

    For those working in computer science related jobs, especially those working in education, Hello World magazine is a free publication available as a PDF download at rpf.io/gethelloworldfree. It is a great publication and community contributions are open to those who would like to submit articles. Follow the link and see what you think :)

    (I should note that this isn't some piracy website giving away PDFs of paid-for magazines. I work for the Raspberry Pi Foundation who publish Hello World and, as with all our publications, we release Hello World as a free PDF on the day of publication)

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

    Advice for phd prep given different undergrad, etc.

    Posted: 09 Apr 2019 11:51 AM PDT

    Hi,

    I have a liberal arts undergrad degree with a relatively low GPA and no CS or math courses from years back. I've started teaching myself CS and want to enter a phd. What do you think the best path for me would be?

    Thanks so much!

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

    No comments:

    Post a Comment