regular expression (complexity)
Last edited: August 8, 2025Regular expressions express computation as a simple, logical discretion, through closure properties (such as properties of regular languages). a family of languages which satisfy closure properties of DFA regular languages, which turns out to be exactly the set of languages that DFA and NFA both recognize.
“What is the complexity of describing the strings in a language?”
definition
Let \(\Sigma\) be an alphabet, we define the regular expressions over \(\Sigma\):
- for all \(\sigma \in \Sigma\), \(\sigma\) is a regexp
- \(\varepsilon\) (empty string) is a regexp
- \(\emptyset\) (empty set) is a regexp
If \(R_1\), \(R_2\) are regexps, then:
regular expression (string processing)
Last edited: August 8, 2025did you know you can do matching inline too matching equivalent statements: test (\w+) \1; non-capture group (?:test)
lookaheads
- (?=pattern) true if pattern matches, but doesn’t touch the character pointer
- (?!pattern) true if pattern doesn’t match; also doesn’t advance pointer
- (?:pattern) will advance character pointer but will not create a capture group
- ^beginning of line
- end of line$
regular language
Last edited: August 8, 2025a language \(L’\) is a regular language if there exists some DFA \(M\) such that \(L’ = L(M)\).
additional information
a proper subset
a proper subset of a regular language isn’t necessarily regular
regular expressions are equivalent to regular languages
see regular expressions are equivalent to regular languages
properties of regular languages
union
union of two languages includes all strings in a or b:
\begin{align} A \cup B = \qty {w | w \in A\ OR\ w \in B } \end{align}
regulating zinc uptake
Last edited: August 8, 2025- zinc binds to zur
- zur inhibits zinc uptake channels
- zinc uptake channel gets zoped
reinforcement learning
Last edited: August 8, 2025reinforcement learning is a decision making method with no known model of the environment at all.
- agent interacts with environment directly
- designer provide a performance measure of the agent in the environment
- agent tries to optimize the decision making algorithm to maximise the performance measure
Note: agent’s own choice of action, in this case, actually influences how the environment works (and what futures the agent sees). So the agent’s actions will influence the environment outcomes
