## Why am I having several errors from javac not finding any packages from javaFx?

I am starting to learn how to make GUI with JavaFx and I was following the basics to run a simple “hello world” program with the book ‘JavaFx 9 by Example’ from Carl Dea.

But in the end, even though I just copied the source code and the bash commands, javac doesn’t acknowledge the javaFx packages.

This is not the first I code in Java, but it is the first time I am using the terminal in MacOs to compile it and run it.

At the same time I am learning JavaFx, I am also assimilating Bash. I read that MacOs have an old version of it; so I replace the one set up by default with a new version ‘5.0.7(1)-release’.

I do not know if it matters, but

$echo "$  BASH_VERSION" 5.0.7(1)-release.  

and.

$bash -version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17).  Also, I downloaded and installed the most recent version of Java some days ago $   java --version   java 12.0.1 2019-04-16 Java(TM) SE Runtime Environment (build 12.0.1+12) Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing) 

It may have to do with the Java Path, but if it is that I am not sure how to solve it.

The problem I believe is when importing the javaFx libraries:

import javafx.application.Application;  import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; 

When I compile it, I get several errors.

Some of them are:

## divide and conquer algorithm for finding a 3-colored triangle in an undirected graph with the following properties?

In an undirected Graph G=(V,E) the vertices are colored either red, yellow or green. Furthermore there exist a way to partition the graph into two subsets so that |V1|=|V2| or |V1|=|V2|+1 where the following conditions apply: either every vertex of V1 is connected to every vertex of V2 or no Vertex of V1 is connected to a vertex of V2 . This applies recursively to all induced subgraphs of V1 and V2

I can find all triangles in the Graph by multiplying the adjacency matrix with itself three times and step up the nodes corresponding to the non zero entries of the main diagonal. Then I can see if the nodes of the triangle are colored the right way. O(n^~2,8)! But given the unique properties of the graph I want to find a solution using divide and conquer to find the colored triangle. this is an example graph with the given properties. I need to find the bold triangle:

Blue boxes symbolize the partitions are fully connected, purple boxes mean no connection between the partitions There is no connection between the coloring of nodes and the partitions, also the partitions have to be computed on the fly

## Finding when a turing machine accepts, rejects, loops and its partial function

Finding when a turing machine (a) accepts, (b) rejects, (c) loops (d) partial function under $$\Sigma = \{0, 1\}$$.

This is the turing machine:

(a) 0

(b) emptyset

(c) What is looping is it when the turing machine is stuck at some value constantly going left and right?

(d) im not sure how to write partial function but I got the regex for this is$$(0+1)^* 0 (0+1)^*$$

any help appreciated.

## Programmaticaly finding the Landau notation (Big O or Theta notation) of an algorithm?

I’m used to search for the Landau (Big O, Theta…) notation of my algorithms by hand to make sure they are as optimized as they can be, but when the functions are getting really big and complex, it’s taking way too much time to do it by hand. it’s also prone to human errors.

I spent some time on Codility (coding/algo exercises), and noticed they will give you the Landau notation for your submitted solution (both in Time and Memory usage).

I was wondering how they do that… How would you do it?

Is there another way besides Lexical Analysis or parsing of the code?

This question concerns mainly PHP and or JavaScript, but I’m opened to any language and theory.