• Breaking News

    Sunday, January 3, 2021

    Library to create convolutional neural network in the easiest possible way (just one line) Computer Science

    Library to create convolutional neural network in the easiest possible way (just one line) Computer Science


    Library to create convolutional neural network in the easiest possible way (just one line)

    Posted: 03 Jan 2021 01:20 AM PST

    Why can't we give requests IDs and ignore duplicates to mitigate the two generals problem

    Posted: 02 Jan 2021 05:11 PM PST

    Everyone has experienced the textbook example of the two generals problem at one point or another. You send a message to your friend, but your downlink has either failed or is unstable. The server receives the message and sends an acknowledgement back to the client, but the acknowledgement doesn't make it. Your client assumes the message didn't make it, so it sends the message again. The server receives a second copy of the message, and now you've sent the message twice.

    But what if each request to send a message had an ID, and the server just ignored it if it received 2 requests with the same ID? At least in my example, this seems like it would solve the problem. Your client sends the message with ID 123456, the server receives the message and sends back an acknowledgement. The acknowledgement doesn't make it to the client, so the client resends the message, still with ID 123456. The server gets the message again, and goes "I already have message 123456" and ignores it.

    This is such a simple solution to such a common problem, surely there is an actual reason nobody does this

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

    Readers Writers Problem (Writer Priority)

    Posted: 03 Jan 2021 03:20 AM PST

    XOR cipher, How to find key?

    Posted: 03 Jan 2021 03:44 AM PST

    So i have the following set of equations and i am told to find the key which was used to encrypt all numbers.

    1 + 1 = 24225053 69 + 420 = 24225524 13670645 + 1024 = 0 2020 + 2021 = 24226516 

    In every given equation, all 3 numbers are encrypted. If you consider the real values, then the addition works out correctly. The key is in binary format for each letter having a 5 bit binary output for example "club" outputs the key 00011011001010100010 As c is 3rd letter in the alphabet hence c==00011 and similarly the other letters. I have no idea how to proceed further.

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

    The Most Popular Programming Languages - 1965/2020 - Statistics and Data

    Posted: 02 Jan 2021 10:38 AM PST

    Are preorder DFS and postorder DFS of a graph reverse to each other?

    Posted: 02 Jan 2021 01:06 PM PST

    Are preorder DFS and postorder DFS of a graph reverse to each other?

    https://en.wikipedia.org/wiki/Depth-first_search#Vertex_orderings says no:

    • A reverse preordering is the reverse of a preordering, i.e. a list of the vertices in the opposite order of their first visit. Reverse preordering is not the same as postordering.

    • A reverse postordering is the reverse of a postordering, i.e. a list of the vertices in the opposite order of their last visit. Reverse postordering is not the same as preordering.

    I believe yes, with an addition to reverse the traversal order between children of a vertex. My reasoning is based on CLRS' Introduction of Algorithms 3ed

    22.3 Depth-first search

    Another important property of depth-first search is that discovery and finishing times have parenthesis structure. If we represent the discovery of vertex u with a left parenthesis "(u" and represent its finishing by a right parenthesis "u)", then the history of discoveries and finishings makes a well-formed expression in the sense that the parentheses are properly nested. For example, the depth-first search of Figure 22.5(a) corresponds to the parenthesization shown in Figure 22.5(b). The following theorem provides another way to characterize the parenthesis structure.

    Theorem 22.7 (Parenthesis theorem) In any depth-first search of a (directed or undirected) graph G = (V,E), for any two vertices u and v, exactly one of the following three conditions holds:

    • the intervals [u.d, u.f] and [v.d, v.f] are entirely disjoint, and neither u nor v is a descendant of the other in the depth-first forest,
    • the interval [u.d, u.f] is contained entirely within the interval [v.d, v.f], and u is a descendant of v in a depth-first tree, or
    • the interval [v.d, v.f] is contained entirely within the interval [u.d, u.f], and v is a descendant of u in a depth-first tree.

    Thanks.

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

    [REQUEST] Introduction to Languages and the Theory of Computation Book by John C. Martin Soultions? 4th ed

    Posted: 02 Jan 2021 10:12 AM PST

    Struggling to find a site where i can access these solutions? willing to buy it , just need a site where it's available. If free even better but i don't mind

    submitted by /u/Z3N-
    [link] [comments]

    Is it possible to cram 3 modules in a week?

    Posted: 02 Jan 2021 03:00 PM PST

    Why doesn't the linked list program print anything? Can the code in my insert() be shorter?

    Posted: 02 Jan 2021 06:36 AM PST

    #include<stdio.h> #include<stdlib.h> typedef struct node{ int value; struct node* next; }node; node* first=NULL; node* last=NULL; void insert(node* first, node* last,int value){ node* temp2=malloc(sizeof(node)); temp2->value=value; if(last==NULL){ first=last=temp2; temp2->next=NULL; return; } node* temp=last; while(!(temp->value<value && (temp->next->value>value||temp->next==NULL))) temp=temp->next; temp2->next=temp->next; if(last->value>=value){//if the value is the smallest last=temp2; return; } temp->next=temp2; } int main(){ insert(first,last,5); printf("%d ",last->value); insert(first,last,3); printf("%d ",last->value); } 
    submitted by /u/JacksonSteel
    [link] [comments]

    No comments:

    Post a Comment