Regular Expression of given Automata - regular-language

Can someone please help me in finding the regular expression for the given automata?
I know the basic steps of finding but in this question I'm stuck because in this case the initial and final states are same as well as their is a two parallel loops.
I tried it by applying basic rules for finding regular expression but after some steps I'm stuck. Please help me in solving this.
A new approach of finding would be appreciated.
Thanks!!

hope u fine
i applied "bypass/state elimination algorithm" on this DFA
after solving it out ..i retrive this RE maybe it looked some what like messy but yes you can check it out by testing different string .here it is
1*+ (1*0(1)*0(0)*1).((01*0+1).(1)*(0(0)*1))*.0

Related

How to get specific RNA sequence of Anndata?

I have a question where I don´t know how to start this. We did a scRNA sequencing experiment and I now have an AnnData dataset. I already know a lot about this dataset mainly by using scanpy library and I would like to "finalise" the analysis by extracting genes that have a specific RNA sequence in the 3'UTR.
Unfortunately I have no idea how to approach this since I am no bioinformatician and couldn´t find a tutorial to do this. Can someone please help me with this problem?
Here how it looks like.
Thanks in advance!
I just found a way around in R. It is on the bases on BSgenome.Mmusculus.UCSC.mm10. You can find the answer here. Just read in the result in python as a list and us the function sc.tl.score_genes to see where they are enriched.

Sliding tile puzzle in Python 3, where to begin?

I am pretty new to coding and I'm currently stuck on the following practice questions in my textbook.
Write a program that generates an 'eight puzzle'. It should randomly shuffle the puzzle, then allow the user to solve it.
Extend your program so it has a 'solve' option that will solve it using A* search.
The problem is, after hours of browsing the web and YouTube, I only come across tutorials and examples which either assume advanced knowledge of this topic or include no useful annotations which would help me learn it.
I was wondering if anyone could please point me to a resource of some sort that explains how to even approach such a puzzle in Python 3. I have no clue what the best way to learn and start this is.
Thank you in advance for your time and help.

How to automatically detect code snippet from a text sample?

I'm doing some analysis on GitHub comments. But for that, I need to exclude the code samples and error messages from the comments automatically from a large set.
The other easier way to say this would be, I can keep only the English part of the comments. Although there are few libraries to detect the language of a sentence, there are few challenges in my case too. 1) the comment part does not always follow proper English grammar, 2) the code sample and error message mainly consist of English words too.
So what should be my best approach. The results don't need to be 100% accurate, I just want to know the best approach that can give me a satisfactory result at least. Any idea?
This question is old, but my Google search led me to this question; so offering this answer in case anyone stumbles into this question, too.

Semantics based code search

We have a large number of repositories. We want to implement a semantics(functionality) based code search on those repositories. Right now, we already have implemented keyword based code search in which we crawled through all the repository files and indexed them using elasticsearch. But that doesn't solve our problem as some of the repositories are poorly commented and documented, thus searching for specific codes/libraries become difficult.
So my question is: Is there any opensource libraries or any previous work done in this field which could help us index the semantics of the repository files, so that searching the code becomes easy and this would also help us in re-usability of the codes. I have found some research papers like Semantic code browsing, Semantics-based code search etc. but were of no use as there was no actual implementation given. So can you please suggest some good libraries or projects which could help me in achieving the same.
P.S:-Moreover, companies like Koders, Google, cocycles.com etc. started their code search based on functionality. But most of them have shut down their operations without giving any proper feedback, can anyone please tell me what kind of difficulties they are facing.
not sure if this is what you're looking for, but I wrote https://github.com/google/zoekt , which uses ctags-based understanding of code to improve ranking.
Take a look at insight.io
It provides semantic search and browsing

Suffix tries vs dynamic programming for string algorithms

It seems that many difficult string algorithms can be solved both using suffix tries(trees) and Dynamic Programming.
But I am not sure which approach is best to use and when.
Additionally which approach is better to master on the specific area of algorithms and have it in your arsenal in the area of job interviews? I assume it would be the one that would be used more frequently by a programmer in any task or something like that?
This is more of which algorithmic technique is more useful to master as most frequent to use in your job than simply comparing asymptotic notations
Think of a problem requiring the Lexicographically nth substring of a given string : A suffix array is just what you need...and it is easy to learn the bare essentials for solving most problems involving suffix arrays..
On the other hand DP is an algorithmic technique..MASTER IT and you will be able to solve a HUGE number of problems..not only strings.
For an interview though i will take DP anyday...for interviewers, a DP problem lets them make it knotty that is almost impossible to solve without DP (within given constraints) but the solution would mean that you give them a basic recursion and how DP helps you solve it.If it were a suffix-array-only-problem that would mean that they are assessing you over a single data structure( easy once learned) rather than an more general technique which requires mastery.
PS: I had put off learning DP until recently when i got fed up trying to solve problems (that require DP ) using any advanced data structures and would invariably fail ( Case in point : UVA 1394 -- simple problem now that i know how to solve it using DP but instead went on to study segment trees and achieved a O(nlgn) whereas DP gave me O(n). So final advice : if one hasn't studied DP drop everything else and go for it.
honestly, for job interview, no suffix tree is needed. that's too difficult and beyond the scope. however, DP is widely used in interviews for some famous companies like google and facebook.
suffix tree has limitation for solving problems compared with DP. usually it is used to solve string related problems. but DP can solve many different areas.

Resources