Question: Trying to understand an assignment I did not do correctly.

Assume all the (closed) frequent itemsets and their support counts are:

* Support( {A, B, C, D} ) = 0.3
* Support( {A, B, C} ) = 0.4
* What is Conf(B -> ACD) = ?
* What is Conf(A -> BCD) = ?
* What is Conf(ABD -> C) = ?
* What is Conf(BD -> AC) = ?

I was under the impression that for {confidence a -> bcd}, I could just do .4/.3 .... obviously incorrect, as support cannot be greater than 1. 

Could someone enlighten me?

Answer: 
The problem in the equation it should be : 

```
import java.lang.*;
public class Distance
{
       public static void main(String[] args) {
        double x1 = 4;
        double x2 = 6;
        double y1 = 4;
        double y2 = 10;
        double distance = Math.sqrt(Math.pow((y2 - y1), 2) + Math.pow((x2 - x1), 2));
        System.out.println(distance);
    }

}

```

[![enter image description here](https://i.stack.imgur.com/w1XyC.png)](https://i.stack.imgur.com/w1XyC.png)
`Math.pow` takes 2 arguments - the base and the exponent. In the formula you have to square the differences, so it should look like this:

```
double distance = Math.sqrt(Math.pow(y2 - y1, 2) + Math.pow(x2 - x1, 2));
//                                   ^^^^^^^                ^^^^^^^

```