How many triangles are there in the picture? There are eight points, connection between each other. See figure [1]
In addition to the red dot, any three line segments do not intersect at one point.

  
*
  
*How many triangles are there in the picture?  
  
*If you remove three segments, maximum number of triangles left?
  

Thanks a lot!

 A: Not an answer - just an upper bound.
Notice that every triangle in the figure contains exactly three edges in the graph. And $3$ edges can form at most $1$ triangle. So an upper bound for this quantity is:
$$e \choose 3$$
where $e = {8 \choose 2}$.
Sketch Argument
Further notice that no 3 lines are parallel. Therefore, any choice of 3 lines must intersect somewhere. The number of triangles in the figure is then the number of sets of three lines whose 3 intersection points lie within the octagon. Perhaps this is an easier problem to solve. Perhaps we can tighten the bound. I conjecture that a lower bound is at least
$$\frac14 {e \choose 3}$$
because there can be either $0, 1, 2, 3$ intersection points within the octagon, and I feel that there can hardly be more outside than inside. Admittedly, this is just my gut instinct talking.
A: Hint:Have you found out the total number of lines in the picture? 
If not find it By adding the number of sides of the polygon and the diagonals.Find number of diagonals using the formula {$n\choose 2$-$n$} where $n$ is the number of sides in the polygon.
A: not quite a correct answer, see comments
We can choose any triangle by: 


*

*Select one edge of the graph (ie between 2 red nodes). 

*Select any two points on that edge, either the red nodes or the intersections. 

*The two points selected form one side of a triangle. 

*Each triangle can be identified by 3 mini line segments so we can divide by 3.
There are 8 points and therefore 8 edges of each of several types.
8 of the edges are between consecutive nodes so they only have 2 points and give rise to 1 segment.
8 of the edges are between nodes separated by 2 sides, these have 7 points (2 ends, plus the edges between the intermediate node and the 5 remaining ones) and thus 7×6=42 segments.
8 of the edges are between nodes separated by 3 sides, these have 10 points (2 ends, plus the edges between the 2 intermediate nodes and the 4 remaining ones) and thus 10×9=90 segments.
4 of the edges are between nodes separated by 4 sides, these have 11 points (2 ends, plus the edges between the 3 nodes on one side and the 3 on the other) and thus 11×10=110 segments.
Total = 8 + 8×42 + 8×90 + 4×110 = 440+720+336+8 = 1504
this doesn't divide by 3 so there must be something wrong, see comments
Whether there's a closed form for the n-noded case, i don't know. I suspect there would be at least a difference between odd and even numbers.
