#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

const double EPS = 1.0e-10;

int elementaryMatrix(vector<vector<double> >& mat)
{
    const int n = mat.size();
    const int m = mat[0].size();
    int y = 0;
    int x = 0;
    while(y < n && x < m){
        int tmp = y;
        for(int i=y+1; i<n; ++i){
            if(abs(mat[i][x]) > abs(mat[tmp][x]))
                tmp = i;
        }
        if(abs(mat[tmp][x]) > EPS){
            mat[y].swap(mat[tmp]);
            for(int i=y+1; i<n; ++i){
                for(int j=m-1; j>=x; --j){
                    mat[i][j] -= mat[y][j] * (mat[i][x] / mat[y][x]);
                }
            }
            ++ y;
        }
        ++ x;
    }
    mat.resize(y);
    return y;
}

bool linearSystem(vector<vector<double> >& mat, vector<double>& x)
{
    int n = mat[0].size() - 1;
    if(elementaryMatrix(mat) != n || mat[n-1][n-1] == 0)
        return false;

    x.resize(n);
    for(int i=n-1; i>=0; --i){
        x[i] = mat[i][n];
        for(int j=i+1; j<n; ++j)
            x[i] -= mat[i][j] * x[j];
        x[i] /= mat[i][i];
    }
    return true;
}

template <size_t T>
bool nextBitset(bitset<T> &bs, int digit)
{
    if(bs.none())
        return false;
    bitset<T> x, y, z;
    x = bs.to_ulong() & (~(bs.to_ulong()) + 1ULL);
    y = bs.to_ulong() + x.to_ulong() + 0ULL;
    z = bs & ~y;
    if(bs[digit-1] && bs == z)
        return false;
    bs = ((z.to_ulong() / x.to_ulong()) >> 1) + 0ULL;
    bs |= y;
    return true;
}

int main()
{
    int n, m;
    cin >> n >> m;

    vector<vector<int> > edges(n);
    for(int i=0; i<m; ++i){
        int a, b;
        cin >> a >> b;
        edges[a-1].push_back(b-1);
        edges[b-1].push_back(a-1);
    }

    vector<vector<int> > index(1<<n, vector<int>(n, -1));
    vector<double> prob(n, 0.0);
    for(int i=0; i<n; ++i)
        index[(1<<n)-1][i] = i;

    for(int i=n-1; i>=1; --i){
        int size = 0;
        bitset<10> bs((1<<i)-1);
        do{
            for(int j=0; j<n; ++j){
                if(bs[j]){
                    index[bs.to_ulong()][j] = size;
                    ++ size;
                }
            }
        }while(nextBitset(bs, n));

        vector<vector<double> > mat(size, vector<double>(size+1, 0.0));
        for(int j=0; j<size; ++j){
            mat[j][j] = 1.0;
            mat[j][size] = 1.0;
        }

        bs = (1<<i)-1;
        do{
            for(int j=0; j<n; ++j){
                if(bs[j]){
                    for(unsigned k=0; k<edges[j].size(); ++k){
                        int next = edges[j][k];
                        if(bs[next]){
                            mat[index[bs.to_ulong()][j]][index[bs.to_ulong()][next]] = -1.0 / edges[j].size();
                        }else{
                            bitset<10> bs2 = bs;
                            bs2[next] = true;
                            mat[index[bs.to_ulong()][j]][size] += prob[index[bs2.to_ulong()][next]] / edges[j].size();
                        }
                    }
                }
            }
        }while(nextBitset(bs, n));
        linearSystem(mat, prob);
    }

    printf("%.10f\n", prob[index[1][0]]);

    return 0;
}

Measured memory_bytes: 13772