An alternative method is proposed for the robust estimation of a and b values of the Gutenberg-Richter relation. The main hypothesis is that b values depend on material properties and the seismotectonic setting and therefore should vary relatively smoothly in space. As far as the a values are concerned, more sharp variations are allowed because these values determine the seismicity level, once the b value is fixed. The study area is organized into a grid, and the a and b values are simultaneously determined for the whole grid by solving an appropriate linear system. Smooth b variations are imposed by introducing additional linear constraints, similar to the Occam's inversion used in tomography studies. The method is applied to Greece and the surrounding area, which is a high seismicity area. The results are in very good agreement with previous studies and further enhance our knowledge for the study area. Moreover, additional seismicity measures (return periods, probabilities, etc.) are estimated robustly because they depend on the a and b values obtained for this area.